TCLDROP
Would you like to react to this message? Create an account in a few clicks or log in to continue.
TCLDROP

Eggdrop And TCL Help, Support And Chat
 
HomeHome  PublicationsPublications  FAQFAQ  SearchSearch  MemberlistMemberlist  Latest imagesLatest images  UsergroupsUsergroups  RegisterRegister  Log in  CalendarCalendar  WebsiteWebsite  ChatRoomChatRoom  

 

 PubCMD

Go down 
3 posters
Go to page : 1, 2, 3  Next
AuthorMessage
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD Empty
PostSubject: PubCMD   PubCMD Empty27/6/2020, 10:38

Code:

#################################################################################################################################################################
# PubCMD.tcl 6.0
################################################################################################################################################################
#ComputerTech
#IRC Irc.mindforge.org #ComputerTech123
#EMAIL COMPUTERTECH312@GMAIL.COM
#GitHub  https://github.com/computertech312
#################################################################################################################################################################
#START OF SETTINGS#

#Set trigger

set pubcmd "?"

#if you want to change which flags can use which command change the following e.g   o|o

#set flag for normal commands

set flag "o|o"

#set flag for important commands

set topflag "n|n"

#END OF SETTINGS#
#################################################################################################################################################################

bind pub ${flag} ${pubcmd}ban do_ban
bind pub ${flag} ${pubcmd}unban do_unban
bind pub ${flag} ${pubcmd}mute do_mute
bind pub ${flag} ${pubcmd}unmute do_unmute
bind pub ${flag} ${pubcmd}voice do_voice
bind pub ${flag} ${pubcmd}devoice do_devoice
bind pub ${flag} ${pubcmd}rehash do_rehash
bind pub ${flag} ${pubcmd}restart do_restart
bind pub ${flag} ${pubcmd}op do_op
bind pub ${flag} ${pubcmd}deop do_deop
bind pub ${topflag} ${pubcmd}die do_die
bind pub ${topflag} ${pubcmd}ignore ignore:pub
bind pub ${topflag} ${pubcmd}ignores ignore:list
bind pub ${flag} ${pubcmd}kick do_kick
bind pub ${flag} ${pubcmd}kickban do_kickban
bind pub ${flag} ${pubcmd}link do_link
bind pub ${flag} ${pubcmd}unlink do_unlink
bind pub ${flag} ${pubcmd}link do_link
bind msg ${flag} ${pubcmd}say do_say
bind pub ${flag} ${pubcmd}topic do_set_topic
bind pub ${flag} ${pubcmd}join do_join_chan
bind pub ${flag} ${pubcmd}chanset pub:chanset
bind pub ${flag} ${pubcmd}part do_remv_chan
bind pub ${flag} ${pubcmd}pubhelp do_pub_help
bind pub ${flag} ${pubcmd}nick do_nick
bind pub ${flag} ${pubcmd}mode do_mode

proc do_pub_help { nick uhost hand chan text } {

putserv "Notice $nick :The Following Are The Commands Of PubCmd The Trigger You Have Set Will Be Infront Of Each Of These Commands"
putserv "Notice $nick :ban , unban , mute , unmute , voice , devoice ,rehash , restart , op , deop , die"
putserv "Notice $nick :ignore , ignores , kick , kickban , link , unlink , topic , join , part , mode , puthelp "
putserv "Notice $nick :/msg (botnick) say (message)  (this is the only command that doesnt change)"
}

proc do_ban { nick uhost hand chan text } {


if {![botisop $chan]} {
putserv "privmsg $chan :I'm Not Op'd"
return 0
}

set bnick [lindex [split $text] 0 ]

if {[isbotnick $bnick]} {
putkick $chan $nick "Banning The Bot Wont Be Tolerated"
}

if {[matchattr [nick2hand $bnick] n]} {
putserv "PRIVMSG $chan :I won't ban an owner!"
putkick $chan $nick "Never Ban The Owner"
}


if {[onchan $bnick $chan]} {
set host "[maskhost $bnick![getchanhost $bnick $chan] 2]"
pushmode $chan +b $host
putserv "PRIVMSG $chan :$bnick Has Been Banned"
   } else {
pushmode $chan +b $bnick
   

}

}
proc do_unban { nick uhost hand chan text } {


if {![botisop $chan]} {
putserv "privmsg $chan :I'm Not Op'd"
return 0
}

set unbnick [lindex [split $text] 0 ]

if {[onchan $unbnick $chan]} {
set uhost "[maskhost $unbnick![getchanhost $unbnick $chan] 2]"
pushmode $chan -b $uhost
   putserv "PRIVMSG $chan :$unbnick Has Been Unbanned"
   } else {
pushmode $chan -b $unbnick

}

}

proc do_mute {nick uhost hand chan text} {


if {![botisop $chan]} {
putserv "privmsg $chan :I'm Not Op'd"
return 0
}

set mnick [lindex [split $text] 0 ]

if {[isbotnick $mnick]} {
putserv "$chan $nick :Muting The Bot Wont Be Tolerated"
}

if {[matchattr [nick2hand $mnick] n]} {
putserv "PRIVMSG $chan :I won't Mute an owner!"

}

   if {[isvoice $mnick $chan]} {
set mhost "[maskhost $mnick![getchanhost $mnick $chan] 2]"
pushmode $chan -v $mnick
   }

if {[onchan $mnick $chan]} {
set mhost "[maskhost $mnick![getchanhost $mnick $chan] 2]"
pushmode $chan +b $mhost
       putserv "PRIVMSG $chan :$mnick Has Been Muted"
     


}

}

proc do_unmute {nick uhost hand chan text} {

if {![botisop $chan]} {
putserv "privmsg $chan :I'm Not Op'd"
return 0
}

set unmnick [lindex [split $text] 0 ]

set unmhost [getchanhost $unmnick $chan]
if {[onchan $unmnick $chan]} {
pushmode $chan -b [maskhost $unmnick!$unmhost 2]

putserv "privmsg $chan :$unmnick has been Unmuted"

}
}



proc do_voice { nick uhost hand chan text } {

if {![botisop $chan]} {
putserv "privmsg $chan :/<pssst!/>  I'm not op'd "
return 0
}

set 2voice [lindex [split $text] 0 ]

if {![onchan $2voice $chan]} {
putserv "privmsg $chan :$nick currently $2voice is not on $chan"
return 0
}
   if {[isvoice $2voice $chan]} {
       putserv "privmsg $chan :$2voice Already Has Voice"
       return 0
 }
putquick "MODE $chan +v $2voice"
}

proc do_devoice { nick uhost hand chan text } {

if {![botisop $chan]} {
putserv "privmsg $chan :/<pssst!/>  I'm not op'd  "
return 0
}

set 2devoice [lindex [split $text] 0 ]
   if {![isvoice $2devoice $chan]} {
 
}
if {![onchan $2devoice $chan]} {
putserv "privmsg $chan :$nick currently $2devoice is not on $chan"
return 0
}
putquick "MODE $chan -v $2devoice"


}

proc do_rehash { nick uhost hand chan text } {
putquick "PRIVMSG $chan :Rehash Requested By $nick Rehashing..."
rehash
}

proc do_restart { nick uhost hand chan text } {
putquick "PRIVMSG $chan :Restart Requested By $nick Restarting...)"
restart
}


proc do_op { nick uhost hand chan text } {

if {![botisop $chan]} {
putserv "privmsg $chan :I'm not op'd"
return 0
}

set 2op [lindex [split $text] 0 ]

if {[isop $2op $chan]} {
       putserv "privmsg $chan :$2op Already Has Ops"
       return 0
}
putquick "MODE $chan +o $2op"
}

proc do_deop { nick uhost hand chan text } {

if {![botisop $chan]} {
putserv "privmsg $chan :I'm not op'd"
return 0
}

set 2deop [lindex [split $text] 0 ]

if {![isop $2deop $chan]} {
       putserv "privmsg $chan :$2deop Doesnt Have Ops"
       return 0
}


putquick "MODE $chan -o $2deop"
}

proc do_die { nick uhost hand chan text } {
if {$text == ""} {
die $nick
} else { die $text }
}

proc do_kick {nick uhost handle chan text} {

set 2kick [lindex [split $text] 0 ]

if {![botisop $chan]} {
putserv "privmsg $chan :I'm Not Op'd"
return 0
}


if {[isbotnick $2kick]} {
putkick $chan $nick "Kicking The Bot Wont Be Tolerated"
}

if {[matchattr [nick2hand $2kick] n]} {
putserv "PRIVMSG $chan :I won't Kick an owner!"
putkick $chan $nick "Never Kick The Owner"
}


if {[onchan $2kick $chan]} {
     putquick "kick $chan $2kick"
}

}



proc do_kickban {nick uhost hand chan text} {

if {![botisop $chan]} {
putserv "privmsg $chan :I'm Not Op'd"
return 0
}

set kbnick [lindex [split $text] 0 ]

set kbhost [getchanhost $kbnick $chan]
if {[onchan $kbnick $chan]} {
pushmode $chan +b [maskhost $kbnick!$kbhost 2]
putquick "MODE $chan +b $kbnick"
     flushmode $chan
            putquick "kick $chan $kbnick"
           putserv "privmsg $chan :$kbnick has been KickBanned"

}

}



proc getpubcmd {} {
global pubcmd
return $pubcmd
}


proc ignore:pub {nick uhost hand chan text} {
if {[lindex [split $text] 0] == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}

if {[lindex [split $text] 0] == "add"} {
set addmask [lindex [split $text] 1]
if {$addmask == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
if {[isignore $addmask]} {putquick "NOTICE $chan :\037ERROR\037: This is already a Valid Ignore."; return}
set duration [lindex [split $text] 2]
if {$duration == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
set reason [join [lrange [split $text] 3 end]]
if {$reason == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
newignore $addmask $hand "$reason" $duration
putquick "NOTICE $chan :\002New Ignore\002: $addmask - \002Duration\002: $duration minutes - \002Reason\002: $reason"
return 0
}

if {[lindex [split $text] 0] == "del"} {
set delmask [lindex [split $text] 1]
if {$delmask == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
if {![isignore $delmask]} {putquick "NOTICE $chan :\037ERROR\037: This is NOT a Valid Ignore."; return}
killignore $delmask
putquick "NOTICE $chan :\002Removed Ignore\002: $delmask"
return 0
}
}


proc ignore:list {nick uhost hand chan text} {
if {[matchattr [nick2hand $nick] o]} {
if {[ignorelist] == ""} {
putquick "NOTICE $nick :\002There are Currently no Ignores\002"
} else {
putquick "NOTICE $nick :\002Current Ignore List\002"
foreach ignore [ignorelist] {
set ignoremask [lindex $ignore 0]
set ignorecomment [lindex $ignore 1]
set ignoreexpire [lindex $ignore 2]
set ignoreadded [lindex $ignore 3]
set ignorecreator [lindex $ignore 4]
set ignoreexpire_ctime [ctime $ignoreexpire]
set ignoreadded_ctime [ctime $ignoreadded]
if {$ignoreexpire == 0} {
set ignoreexpire_ctime "perm"
}
putserv "NOTICE $nick : "
putserv "NOTICE $nick :\002Mask\002: $ignoremask - \002Set by\002: $ignorecreator."
putserv "NOTICE $nick :\002Reason\002: $ignorecomment"
putserv "NOTICE $nick :\002Created\002: $ignoreadded_ctime. - \002Expiration\002: $ignoreexpire_ctime."
}
}
}
}


proc do_link {nick ushost handle chan text} {
set 2link [lindex [split $text] 0 ]
   putquick "NOTICE $nick :Linking To $2link"    
link $2link
}


proc do_unlink {nick ushost handle chan text} {
set 2unlink [lindex [split $text] 0 ]
puthelp "Privmsg $chan :Unlinking From $2unlink"
   unlink $2unlink
}


proc do_say {nick uhost hand args} {
global botnick
if {[llength [lindex $args 0]]<2} {
putserv "NOTICE $nick :/msg $botnick !say <#chan> <something to say>"
} else {
set chan [lindex [lindex $args 0] 0]
if { ![validchan $chan]} {
putserv "NOTICE $nick :\"$chan\": invalid chan."
return 0
}

if { ![onchan $botnick $chan] } {
putserv "NOTICE $nick :i'm not on the chan \"$chan\"."
return 0
}
set msg [lrange [lindex $args 0] 1 end]
}
putchan $chan $msg
}


proc do_set_topic {nick ushost handle chan text} {

puthelp "topic $chan :$text"

 }

proc do_join_chan {nick uhost handle chan text} {

set 1chan [lindex [split $text] 0 ]

channel add  $1chan

putserv "privmsg $chan :Successfully Joined $1chan"
}

proc do_remv_chan {nick uhost handle chan text} {

set 2chan [lindex [split $text] 0 ]

channel remove $2chan

putserv "privmsg $chan : "Successfully Left $2chan"
}

proc pub:chanset {nick uhost hand chan arg} {
foreach {set value} [split $arg] {break}
if {![info exists value]} {
 catch {channel set $chan $set} error
} {
 catch {channel set $chan $set $value} error  
}
if {$error == ""} {
 puthelp "privmsg $chan :Successfully set $arg"
} {
 puthelp "privmsg $chan :Error setting $arg: [lindex $error 0]..."
}
}

proc do_nick {nick uhost hand chan text} {
set newnick [lindex [split $text] 0 ]
set nick $newnick
putserv "privmsg $chan :Successfully Changed My Nick To $newnick"
}

proc do_mode {nick uhost hand chan text} {

set 2mode [lindex [split $text] 0 ]

putquick "mode $chan $2mode"

putserv "privmsg $chan :Successfully Set The Modes $2mode"

}

putlog "PubCMD.tcl Made By ComputerTech LOADED"
#################################################################################################################################################################


Last edited by ComputerTech on 1/7/2020, 12:06; edited 2 times in total
Back to top Go down
http://www.computer-tech1.webnode.co.uk
kai
Voice
Voice



Posts : 1
Points : 1
Reputation : 0
Join date : 2020-05-01

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty1/7/2020, 00:14

Brilliant Script ComputerTech, although has one slight error

setting topic only sets the first word

ir you could fix that would be great Very Happy
Back to top Go down
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty1/7/2020, 08:17

Try to replace:

Code:

set new2topic [lindex [split $text] 0 ]

by:

Code:

set new2topic $text

Or:

Code:

set new2topic [lrange $text 0 end]

Both work

------------------------

And replace:

Code:

puthelp "topic $chan $new2topic"

By:

Code:

puthelp "topic $chan :$new2topic"
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty1/7/2020, 12:04

Yep, i already published Pubcmd 6.0

just forgot to repost here Rolling Eyes

Try the above edited post Or try what Bds said

Either works cheers
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty1/7/2020, 13:38

I'm testing the code and I'm finding little errors.
Code:

proc do_say {nick uhost hand args} {
 global botnick
 if {[llength [lindex $args 0]]<2} {
 putserv "NOTICE $nick :/msg $botnick !say <#chan> <something to say>"
 } else {
 set chan [lindex [lindex $args 0] 0]
 if { ![validchan $chan]} {
 putserv "NOTICE $nick :\"$chan\": invalid chan."
 return 0
 }
 if { ![onchan $botnick $chan] } {
 putserv "NOTICE $nick :i'm not on the chan \"$chan\"."
 return 0
 }
 set msg [lrange [lindex $args 0] 1 end]
 }
 putchan $chan $msg
}

If the trigger set by the variable pubcmd is "?" or other, at the time of a syntax error the bot will answer a wrong command name (!say). the good way is maybe:

Code:

putserv "NOTICE $nick :/msg $botnick ${pubcmd}say <#chan> <something to say>"
And add next to global : pubcmd
At the same time the bot's gonna want to send the message anyway. Maybe adding "return 0" or put's "putchan $chan $msg" below "set msg [lrange [lindex $args 0] 1 end]"

Last thing, putchan is not a native command. I think the best way is "putquick "PRIVMSG $chan :$msg""

------------

Here is the code I will use:

Code:

proc do_say {nick uhost hand args} {
   global botnick pubcmd
   if {[llength [lindex $args 0]]<2} {
      putserv "NOTICE $nick :/msg $botnick ${pubcmd}say <#chan> <something to say>"
  return 0
 } else {
 set chan [lindex [lindex $args 0] 0]
 if { ![validchan $chan]} {
 putserv "NOTICE $nick :\"$chan\": invalid chan."
 return 0
 }
 if { ![onchan $botnick $chan] } {
 putserv "NOTICE $nick :i'm not on the chan \"$chan\"."
 return 0
 }
 set msg [lrange [lindex $args 0] 1 end]
 putquick "PRIVMSG $chan :$msg"
   }
}

For the change nick, i think you forget the server command
Code:

proc do_nick {nick uhost hand chan text} {
 set newnick [lindex [split $text] 0 ]
 set nick $newnick
 putserv "NICK $newnick"
}

I'm testing the script and i tell you if i'm finding other little mistake Wink
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty1/7/2020, 14:41

Great to hear that someone is supporting me Bds Smile

I'll add those updates right away and of course add credit for you on the readme file cheers

Cheers mate
Back to top Go down
http://www.computer-tech1.webnode.co.uk
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty1/7/2020, 14:48

alright lets see if this is better hehe

Code:
#################################################################################################################################################################
# PubCMD.tcl 7.0
################################################################################################################################################################
#ComputerTech
#IRC Irc.mindforge.org #ComputerTech123
#EMAIL COMPUTERTECH312@GMAIL.COM
#GitHub  https://github.com/computertech312
#Forum http://tcldrop.forumotion.com
#Website http://tcl3.webnode.co.uk
#################################################################################################################################################################
#START OF SETTINGS#

#Set trigger

set pubcmd "?"

#if you want to change which flags can use which command change the following e.g  o|o

#set flag for normal commands

set flag "o|o"

#set flag for important commands

set topflag "n|n"

#END OF SETTINGS#
#################################################################################################################################################################

bind pub ${flag} ${pubcmd}ban do_ban
bind pub ${flag} ${pubcmd}unban do_unban
bind pub ${flag} ${pubcmd}mute do_mute
bind pub ${flag} ${pubcmd}unmute do_unmute
bind pub ${flag} ${pubcmd}voice do_voice
bind pub ${flag} ${pubcmd}devoice do_devoice
bind pub ${flag} ${pubcmd}rehash do_rehash
bind pub ${flag} ${pubcmd}restart do_restart
bind pub ${flag} ${pubcmd}op do_op
bind pub ${flag} ${pubcmd}deop do_deop
bind pub ${topflag} ${pubcmd}die do_die
bind pub ${topflag} ${pubcmd}ignore ignore:pub
bind pub ${topflag} ${pubcmd}ignores ignore:list
bind pub ${flag} ${pubcmd}kick do_kick
bind pub ${flag} ${pubcmd}kickban do_kickban
bind pub ${flag} ${pubcmd}link do_link
bind pub ${flag} ${pubcmd}unlink do_unlink
bind pub ${flag} ${pubcmd}link do_link
bind msg ${flag} ${pubcmd}say do_say
bind pub ${flag} ${pubcmd}topic do_set_topic
bind pub ${flag} ${pubcmd}join do_join_chan
bind pub ${flag} ${pubcmd}chanset pub:chanset
bind pub ${flag} ${pubcmd}part do_remv_chan
bind pub ${flag} ${pubcmd}pubhelp do_pub_help
bind pub ${flag} ${pubcmd}nick do_nick
bind pub ${flag} ${pubcmd}mode do_mode
bind pub ${flag{ ${pubcmd}calc Falk.pub:calc
bind pub ${flag} ${pubcmd}fancy Falk:fancy

proc do_pub_help { nick uhost hand chan text } {

putserv "Notice $nick :The Following Are The Commands Of PubCmd The Trigger You Have Set Will Be Infront Of Each Of These Commands"
putserv "Notice $nick :ban, unban, mute, unmute, voice, devoice,rehash, restart, op, deop, die"
putserv "Notice $nick :ignore, ignores, kick, kickban, link, unlink, topic, join, part, mode, fancy, calc ,puthelp"
putserv "Notice $nick :/msg (botnick) say (message)  (this is the only command that doesnt change)"
}

proc do_ban { nick uhost hand chan text } {


   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set bnick [lindex [split $text] 0 ]

   if {[isbotnick $bnick]} {
      putkick $chan $nick "Banning The Bot Wont Be Tolerated"
   }

   if {[matchattr [nick2hand $bnick] n]} {
      putserv "PRIVMSG $chan :I won't ban an owner!"
      putkick $chan $nick "Never Ban The Owner"
   }

   
   if {[onchan $bnick $chan]} {
      set host "[maskhost $bnick![getchanhost $bnick $chan] 2]"
      pushmode $chan +b $host
   putserv "PRIVMSG $chan :$bnick Has Been Banned"
    } else {
      pushmode $chan +b $bnick
   

   }

}
proc do_unban { nick uhost hand chan text } {


   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set unbnick [lindex [split $text] 0 ]

   if {[onchan $unbnick $chan]} {
      set uhost "[maskhost $unbnick![getchanhost $unbnick $chan] 2]"
      pushmode $chan -b $uhost
       putserv "PRIVMSG $chan :$unbnick Has Been Unbanned"
    } else {
      pushmode $chan -b $unbnick

   }

}

proc do_mute {nick uhost hand chan text} {


   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set mnick [lindex [split $text] 0 ]

   if {[isbotnick $mnick]} {
      putserv "$chan $nick :Muting The Bot Wont Be Tolerated"
   }

   if {[matchattr [nick2hand $mnick] n]} {
      putserv "PRIVMSG $chan :I won't Mute an owner!"
      
   }

    if {[isvoice $mnick $chan]} {
      set mhost "[maskhost $mnick![getchanhost $mnick $chan] 2]"
      pushmode $chan -v $mnick
    }

   if {[onchan $mnick $chan]} {
      set mhost "[maskhost $mnick![getchanhost $mnick $chan] 2]"
      pushmode $chan +b $mhost
        putserv "PRIVMSG $chan :$mnick Has Been Muted"
     


   }

}

proc do_unmute {nick uhost hand chan text} {

if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set unmnick [lindex [split $text] 0 ]

   set unmhost [getchanhost $unmnick $chan]
   if {[onchan $unmnick $chan]} {
      pushmode $chan -b [maskhost $unmnick!$unmhost 2]

      putserv "privmsg $chan :$unmnick has been Unmuted"

   }
}



proc do_voice { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :/<pssst!/>  I'm not op'd "
      return 0
   }

   set 2voice [lindex [split $text] 0 ]

   if {![onchan $2voice $chan]} {
      putserv "privmsg $chan :$nick currently $2voice is not on $chan"
      return 0
}
    if {[isvoice $2voice $chan]} {
        putserv "privmsg $chan :$2voice Already Has Voice"
        return 0
  }
      putquick "MODE $chan +v $2voice"
 }

proc do_devoice { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :/<pssst!/>  I'm not op'd  "
      return 0
   }

set 2devoice [lindex [split $text] 0 ]
    if {![isvoice $2devoice $chan]} {
 
}
   if {![onchan $2devoice $chan]} {
      putserv "privmsg $chan :$nick currently $2devoice is not on $chan"
      return 0
}
      putquick "MODE $chan -v $2devoice"


}

proc do_rehash { nick uhost hand chan text } {
   putquick "PRIVMSG $chan :Rehash Requested By $nick Rehashing..."
   rehash
}

proc do_restart { nick uhost hand chan text } {
   putquick "PRIVMSG $chan :Restart Requested By $nick Restarting...)"
   restart
}


proc do_op { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm not op'd"
      return 0
   }

   set 2op [lindex [split $text] 0 ]

 if {[isop $2op $chan]} {
        putserv "privmsg $chan :$2op Already Has Ops"
        return 0
}
   putquick "MODE $chan +o $2op"
}

proc do_deop { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm not op'd"
      return 0
   }
 
set 2deop [lindex [split $text] 0 ]

if {![isop $2deop $chan]} {
        putserv "privmsg $chan :$2deop Doesnt Have Ops"
        return 0
}


   putquick "MODE $chan -o $2deop"
}

proc do_die { nick uhost hand chan text } {
   if {$text == ""} {
      die $nick
   } else { die $text }
}

proc do_kick {nick uhost handle chan text} {

   set 2kick [lindex [split $text] 0 ]

if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }


   if {[isbotnick $2kick]} {
      putkick $chan $nick "Kicking The Bot Wont Be Tolerated"
   }

   if {[matchattr [nick2hand $2kick] n]} {
      putserv "PRIVMSG $chan :I won't Kick an owner!"
      putkick $chan $nick "Never Kick The Owner"
   }

   
   if {[onchan $2kick $chan]} {
      putquick "kick $chan $2kick"
   }

}



proc do_kickban {nick uhost hand chan text} {

   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set kbnick [lindex [split $text] 0 ]

   set kbhost [getchanhost $kbnick $chan]
   if {[onchan $kbnick $chan]} {
      pushmode $chan +b [maskhost $kbnick!$kbhost 2]
      putquick "MODE $chan +b $kbnick"
         flushmode $chan
            putquick "kick $chan $kbnick"
            putserv "privmsg $chan :$kbnick has been KickBanned"

   }

}



proc getpubcmd {} {
   global pubcmd
   return $pubcmd
}


proc ignore:pub {nick uhost hand chan text} {
      if {[lindex [split $text] 0] == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}

      if {[lindex [split $text] 0] == "add"} {
         set addmask [lindex [split $text] 1]
         if {$addmask == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         if {[isignore $addmask]} {putquick "NOTICE $chan :\037ERROR\037: This is already a Valid Ignore."; return}
         set duration [lindex [split $text] 2]
         if {$duration == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         set reason [join [lrange [split $text] 3 end]]
         if {$reason == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         newignore $addmask $hand "$reason" $duration
         putquick "NOTICE $chan :\002New Ignore\002: $addmask - \002Duration\002: $duration minutes - \002Reason\002: $reason"
         return 0
      }

      if {[lindex [split $text] 0] == "del"} {
         set delmask [lindex [split $text] 1]
         if {$delmask == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         if {![isignore $delmask]} {putquick "NOTICE $chan :\037ERROR\037: This is NOT a Valid Ignore."; return}
         killignore $delmask
         putquick "NOTICE $chan :\002Removed Ignore\002: $delmask"
         return 0
      }
   }


proc ignore:list {nick uhost hand chan text} {
   if {[matchattr [nick2hand $nick] o]} {
      if {[ignorelist] == ""} {
         putquick "NOTICE $nick :\002There are Currently no Ignores\002"
      } else {
         putquick "NOTICE $nick :\002Current Ignore List\002"
         foreach ignore [ignorelist] {
            set ignoremask [lindex $ignore 0]
            set ignorecomment [lindex $ignore 1]
            set ignoreexpire [lindex $ignore 2]
            set ignoreadded [lindex $ignore 3]
            set ignorecreator [lindex $ignore 4]
            set ignoreexpire_ctime [ctime $ignoreexpire]
            set ignoreadded_ctime [ctime $ignoreadded]
            if {$ignoreexpire == 0} {
               set ignoreexpire_ctime "perm"
            }
            putserv "NOTICE $nick : "
            putserv "NOTICE $nick :\002Mask\002: $ignoremask - \002Set by\002: $ignorecreator."
            putserv "NOTICE $nick :\002Reason\002: $ignorecomment"
            putserv "NOTICE $nick :\002Created\002: $ignoreadded_ctime. - \002Expiration\002: $ignoreexpire_ctime."
         }
      }
   }
}


proc do_link {nick ushost handle chan text} {
   set 2link [lindex [split $text] 0 ]
    putquick "NOTICE $nick :Linking To $2link"   
   link $2link
}


proc do_unlink {nick ushost handle chan text} {
   set 2unlink [lindex [split $text] 0 ]
   puthelp "Privmsg $chan :Unlinking From $2unlink"
    unlink $2unlink
}

proc do_say {nick uhost hand args} {
  global botnick pubcmd
  if {[llength [lindex $args 0]]<2} {
      putserv "NOTICE $nick :/msg $botnick ${pubcmd}say <#chan> <something to say>"
  return 0
 } else {
 set chan [lindex [lindex $args 0] 0]
 if { ![validchan $chan]} {
 putserv "NOTICE $nick :\"$chan\": invalid chan."
 return 0
 }
 if { ![onchan $botnick $chan] } {
 putserv "NOTICE $nick :i'm not on the chan \"$chan\"."
 return 0
 }
 set msg [lrange [lindex $args 0] 1 end]
 putquick "PRIVMSG $chan :$msg"
  }
}

proc do_set_topic {nick ushost handle chan text} {

puthelp "topic $chan :$text"

  }

proc do_join_chan {nick uhost handle chan text} {

set 1chan [lindex [split $text] 0 ]

channel add  $1chan

putserv "privmsg $chan :Successfully Joined $1chan"
}

proc do_remv_chan {nick uhost handle chan text} {

set 2chan [lindex [split $text] 0 ]

channel remove $2chan

putserv "privmsg $chan : "Successfully Left $2chan"
}

proc pub:chanset {nick uhost hand chan arg} {
 foreach {set value} [split $arg] {break}
 if {![info exists value]} {
  catch {channel set $chan $set} error
 } {
  catch {channel set $chan $set $value} error 
 }
 if {$error == ""} {
  puthelp "privmsg $chan :Successfully set $arg"
 } {
  puthelp "privmsg $chan :Error setting $arg: [lindex $error 0]..."
 }
}

proc do_nick {nick uhost hand chan text} {
set newnick [lindex [split $text] 0 ]
set nick $newnick
putserv "NICK $newnick"
putserv "privmsg $chan :Successfully Changed My Nick To $newnick"
}

proc do_mode {nick uhost hand chan text} {

set 2mode [lindex [split $text] 0 ]

putquick "mode $chan $2mode"

putserv "privmsg $chan :Successfully Set The Modes $2mode"

}


set falk(err) "\0034Error:\003"

proc Falk:fancy {ni u h ch t} {
  global calc falk
    if {![validuser $h]} { set nk(fl) "?" }
   if {[matchattr $h n|n $ch]} {
      set nk(fl) "*"
   } elseif {[matchattr $h m|m $ch]} {
      set nk(fl) "¤"
   } elseif {[matchattr $h o|o $ch]} {
      set nk(fl) "@"
   } elseif {[matchattr $h f|f $ch]} {
      set nk(fl) "+"
   } else {
      set nk(fl) "?"
   }
  if {[lindex $t 0] == ""} { putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}fancy ($falk(err) No word to fancy)" ;putsnot $ni "Error: Forgot to specify something to fancy didnt you? ;o)" ;return 0 }
  foreach letter [split $t ""] {
    set rand [randstring 1 {23456789}]
    append total "\0030$rand$letter"
  }
  putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}fancy $total"
  putmsg $ch "$total"
  unset total
}


proc Falk.pub:calc {ni u h ch t} {
  global calc botnick
    if {![validuser $h]} { set nk(fl) "?" }
   if {[matchattr $h n|n $ch]} {
      set nk(fl) "*"
   } elseif {[matchattr $h m|m $ch]} {
      set nk(fl) "¤"
   } elseif {[matchattr $h o|o $ch]} {
      set nk(fl) "@"
   } elseif {[matchattr $h f|f $ch]} {
      set nk(fl) "+"
   } else {
      set nk(fl) "?"
   }
  set what "[lrange $t 0 end]"
  set result "nothing"
    if {($what == "") || ($what == "help") || ($what == "hjelp")} {
      putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}help Calc"
      putsnot $ni "--=={  -=>      Help for: $${pubcmd}Calc        <=-  }==--"
      putsnot $ni "--=={      Usage: $${pubcmd}calc <num> <param> <num> }==--"
      putsnot $ni "--=={  Calculate whatever you want...      }==--"
      putsnot $ni "--=={  Ex: $${pubcmd}calc 5 + 5                      }==--"
      putsnot $ni "--=={  Shows: <$botnick> Calc: 5 + 5 = 10    }==--"
      putsnot $ni "--=={  OBS! Just a test script as of now!  }==--"
      return 0
    }

  catch {
  set result "[expr $what]"
  } foo
  if {($foo == "1")} { putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}Calc (Error: $what can not be calculated)" ;putchan $ch "$ni: Sorry, $what Can not be calculated! :o(" ;return 0 }
  if {($result == "nothing")} { putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}Calc (Error: $what can not be calculated)" ;putchan $ch "$ni: Sorry, $what Can not be calculated! :o(" ;return 0 }
  putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}Calc ($what = $result)"
  putchan $ch "\0032Calc\003\037:\037\00312 $what \003=\0033 $result\003"
  return 0
}



putlog "PubCMD.tcl By ComputerTech Loaded"
#################################################################################################################################################################

Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty2/7/2020, 10:51

For the command !pubhelp, I propose:

Code:

proc do_pub_help { nick uhost hand chan text } {
   global pubcmd
   putserv "Notice $nick :The Following Are The Commands Of PubCmd :"
   putserv "Notice $nick :${pubcmd}ban , ${pubcmd}unban , ${pubcmd}mute , ${pubcmd}unmute , ${pubcmd}voice , ${pubcmd}devoice ,${pubcmd}rehash , ${pubcmd}restart , ${pubcmd}op , ${pubcmd}deop"
   putserv "Notice $nick :${pubcmd}kick , ${pubcmd}kickban , ${pubcmd}link , ${pubcmd}unlink , ${pubcmd}topic , ${pubcmd}join , ${pubcmd}part , ${pubcmd}mode , ${pubcmd}puthelp"
   putserv "Notice $nick :/msg $::botnick ${pubcmd}say message (this is the only command that doesnt change)"
   if {[matchattr $nick $::topflag]} {
      putserv "Notice $nick :Admin Commands Of PubCmd : ${pubcmd}ignore , ${pubcmd}ignores , ${pubcmd}die"
   }
}

It's just a suggestion Wink
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty2/7/2020, 14:02

Fantastic Idea Bds, adding it right away.

I also found this on a old script i had

Code:

proc op {nick uhost hand chan test } {
set target [lindex $text 0]
set target1 [lindex $text 1]
set target2 [lindex $text 2]
if {$target == ""} {
putserv "mode $chan +v $nick"
} else {
putserv "mode $chan +vvv $target $target1 $target2"
}
}
}

seems like a good code, will add it also Boxer
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty2/7/2020, 15:18

I don't think this code will work.

Code:

proc op {nick uhost hand chan test } {

Code:

set target [lindex $text 0]

The variable text will not exist, test yes He's got an extra  "}" at the end of code
The name of the proc is op while it is used as a voice Wink

I'm fixing your script. It has a few mistakes in it Smile
Back to top Go down
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty2/7/2020, 16:03

This code is better, I think (for massive voice or one voice only):

Code:

proc do_voice {nick uhost hand chan text } {
  if {![botisop $chan]} {
      putserv "privmsg $chan :I'm not op'd"
  } else {
      if {[lindex [split $text] 0 ] !=""} {
         foreach cible [split $text] {
            pushmode $chan +v $cible
         }
         flushmode $chan
      } else {
         pushmode $chan +v $nick
      }
   }
}

proc do_devoice {nick uhost hand chan text } {
  if {![botisop $chan]} {
      putserv "privmsg $chan :I'm not op'd"
  } else {
      if {[lindex [split $text] 0 ] !=""} {
         foreach cible [split $text] {
            pushmode $chan -v $cible
         }
         flushmode $chan
      } else {
         pushmode $chan -v $nick
      }
   }
}
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty2/7/2020, 18:58

Hmm from the looks of it, it does indeed look better cheers

will this voice if i do it like this?

!voice nick nick nick

right?
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty2/7/2020, 19:36

Yes, it's right:

Code:

[20:28] <Glined> !voice Q Qi BdS Glined
[20:28] * Q sets mode: +vvvv Q Qi BdS Glined
[20:28] <+Glined> !devoice Q Qi BdS Glined
[20:28] * Q sets mode: -vvvv Q Qi BdS Glined

You can put as many nick as you want, it's the eggdrop that handles the best way to process the request.

Without nick:

Code:

[20:34] <Glined> !voice
[20:35] * Q sets mode: +v Glined
[20:34] <+Glined> !devoice
[20:35] * Q sets mode: -v Glined

If you want I can even make an voiceall command Wink
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty3/7/2020, 02:04

new version, i think it has all the upgrades i willl look over it, and tell me if you see any errors or missing upgrads Bds Razz

Code:
#################################################################################################################################################################
# PubCMD.tcl 7.0
################################################################################################################################################################
#ComputerTech
#IRC Irc.mindforge.org #ComputerTech123
#EMAIL COMPUTERTECH312@GMAIL.COM
#GitHub  https://github.com/computertech312
#Forum http://tcldrop.forumotion.com
#Website http://tcl3.webnode.co.uk
#################################################################################################################################################################
#START OF SETTINGS#

#Set trigger

set pubcmd "?"

#if you want to change which flags can use which command change the following e.g  o|o

#set flag for normal commands

set flag "o|o"

#set flag for important commands

set topflag "n|n"

#END OF SETTINGS#
#################################################################################################################################################################

bind pub ${flag} ${pubcmd}ban do_ban
bind pub ${flag} ${pubcmd}unban do_unban
bind pub ${flag} ${pubcmd}mute do_mute
bind pub ${flag} ${pubcmd}unmute do_unmute
bind pub ${flag} ${pubcmd}voice do_voice
bind pub ${flag} ${pubcmd}devoice do_devoice
bind pub ${topflag} ${pubcmd}rehash do_rehash
bind pub ${topflag} ${pubcmd}restart do_restart
bind pub ${flag} ${pubcmd}op do_op
bind pub ${flag} ${pubcmd}deop do_deop
bind pub ${topflag} ${pubcmd}die do_die
bind pub ${topflag} ${pubcmd}ignore ignore:pub
bind pub ${topflag} ${pubcmd}ignores ignore:list
bind pub ${flag} ${pubcmd}kick do_kick
bind pub ${flag} ${pubcmd}kickban do_kickban
bind pub ${flag} ${pubcmd}link do_link
bind pub ${flag} ${pubcmd}unlink do_unlnk
bind pub ${flag} ${pubcmd}unlink do_unlink
bind pub ${flag} ${pubcmd}link do_link
bind msg ${flag} ${pubcmd}say do_say
bind pub ${flag} ${pubcmd}topic do_set_topic
bind pub ${flag} ${pubcmd}join do_join_chan
bind pub ${flag} ${pubcmd}chanset pub:chanset
bind pub ${flag} ${pubcmd}part do_remv_chan
bind pub ${flag} ${pubcmd}pubhelp do_pub_help
bind pub ${flag} ${pubcmd}nick do_nick
bind pub ${flag} ${pubcmd}mode do_mode
bind pub ${flag} ${pubcmd}calc Falk.pub:calc
bind pub ${flag} ${pubcmd}fancy Falk:fancy
bind pub ${flag} ${pubcmd}invite do_invite
bind pub ${flag} ${pubcmd}cycle do_cycle

proc do_pub_help { nick uhost hand chan text } {
  global pubcmd
  putserv "Notice $nick :The Following Are The Commands Of PubCmd :"
  putserv "Notice $nick :${pubcmd}ban , ${pubcmd}unban , ${pubcmd}mute , ${pubcmd}unmute , ${pubcmd}voice , ${pubcmd}devoice , ${pubcmd}op , ${pubcmd}deop , ${pubcmd}ping , ${pubcmd}calc"
  putserv "Notice $nick :${pubcmd}kick , ${pubcmd}kickban , ${pubcmd}link , ${pubcmd}unlink , ${pubcmd}topic , ${pubcmd}join , ${pubcmd}part , ${pubcmd}mode , ${pubcmd}puthelp"
  putserv "Notice $nick :${pubcmd}invite,${pubcmd}fancy"
  putserv "Notice $nick :/msg $::botnick ${pubcmd}say message (this is the only command that doesnt change)"
  if {[matchattr $nick $::topflag]} {
      putserv "Notice $nick :Admin Commands Of PubCmd : ${pubcmd}ignore add,${pubcmd}ignore del,${pubcmd}ignores,${pubcmd}di,${pubcmd}rehash ${pubcmd}restart"
  }
  putserv "Notice $nick :Do ?Pubhelp command for more help of a specific command"

}

proc do_ban { nick uhost hand chan text } {


   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set bnick [lindex [split $text] 0 ]

   if {[isbotnick $bnick]} {
      putkick $chan $nick "Banning The Bot Wont Be Tolerated"
   }

   if {[matchattr [nick2hand $bnick] n]} {
      putserv "PRIVMSG $chan :I won't ban an owner!"
      putkick $chan $nick "Never Ban The Owner"
   }

   
   if {[onchan $bnick $chan]} {
      set host "[maskhost $bnick![getchanhost $bnick $chan] 2]"
      pushmode $chan +b $host
   putserv "PRIVMSG $chan :$bnick Has Been Banned"
    } else {
      pushmode $chan +b $bnick
   

   }

}
proc do_unban { nick uhost hand chan text } {


   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set unbnick [lindex [split $text] 0 ]

   if {[onchan $unbnick $chan]} {
      set uhost "[maskhost $unbnick![getchanhost $unbnick $chan] 2]"
      pushmode $chan -b $uhost
       putserv "PRIVMSG $chan :$unbnick Has Been Unbanned"
    } else {
      pushmode $chan -b $unbnick

   }

}

proc do_mute {nick uhost hand chan text} {


   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set mnick [lindex [split $text] 0 ]

   if {[isbotnick $mnick]} {
      putserv "$chan $nick :Muting The Bot Wont Be Tolerated"
   }

   if {[matchattr [nick2hand $mnick] n]} {
      putserv "PRIVMSG $chan :I won't Mute an owner!"
      
   }

    if {[isvoice $mnick $chan]} {
      set mhost "[maskhost $mnick![getchanhost $mnick $chan] 2]"
      pushmode $chan -v $mnick
    }

   if {[onchan $mnick $chan]} {
      set mhost "[maskhost $mnick![getchanhost $mnick $chan] 2]"
      pushmode $chan +b $mhost
        putserv "PRIVMSG $chan :$mnick Has Been Muted"
     


   }

}

proc do_unmute {nick uhost hand chan text} {

if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set unmnick [lindex [split $text] 0 ]

   set unmhost [getchanhost $unmnick $chan]
   if {[onchan $unmnick $chan]} {
      pushmode $chan -b [maskhost $unmnick!$unmhost 2]

      putserv "privmsg $chan :$unmnick has been Unmuted"

   }
}



proc do_voice { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :/<pssst!/>  I'm not op'd "
      return 0
   }

   set 2voice [lindex [split $text] 0 ]

   if {![onchan $2voice $chan]} {
      putserv "privmsg $chan :$nick currently $2voice is not on $chan"
      return 0
}
    if {[isvoice $2voice $chan]} {
        putserv "privmsg $chan :$2voice Already Has Voice"
        return 0
  }
      putquick "MODE $chan +v $2voice"
 }

proc do_devoice { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :/<pssst!/>  I'm not op'd  "
      return 0
   }

set 2devoice [lindex [split $text] 0 ]
    if {![isvoice $2devoice $chan]} {
 
}
   if {![onchan $2devoice $chan]} {
      putserv "privmsg $chan :$nick currently $2devoice is not on $chan"
      return 0
}
      putquick "MODE $chan -v $2devoice"


}

proc do_rehash { nick uhost hand chan text } {
   putquick "PRIVMSG $chan :Rehash Requested By $nick Rehashing..."
   rehash
}

proc do_restart { nick uhost hand chan text } {
   putquick "PRIVMSG $chan :Restart Requested By $nick Restarting...)"
   restart
}


proc do_op { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm not op'd"
      return 0
   }

   set 2op [lindex [split $text] 0 ]

 if {[isop $2op $chan]} {
        putserv "privmsg $chan :$2op Already Has Ops"
        return 0
}
   putquick "MODE $chan +o $2op"
}

proc do_deop { nick uhost hand chan text } {

   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm not op'd"
      return 0
   }
 
set 2deop [lindex [split $text] 0 ]

if {![isop $2deop $chan]} {
        putserv "privmsg $chan :$2deop Doesnt Have Ops"
        return 0
}


   putquick "MODE $chan -o $2deop"
}

proc do_die { nick uhost hand chan text } {
   if {$text == ""} {
      die $nick
   } else { die $text }
}

proc do_kick {nick uhost handle chan text} {

   set 2kick [lindex [split $text] 0 ]

if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }


   if {[isbotnick $2kick]} {
      putkick $chan $nick "Kicking The Bot Wont Be Tolerated"
   }

   if {[matchattr [nick2hand $2kick] n]} {
      putserv "PRIVMSG $chan :I won't Kick an owner!"
      putserv "privmsg $chan :I Wont Kick A Owner"
   }

   
   if {[onchan $2kick $chan]} {
      putquick "kick $chan $2kick"
   }

}



proc do_kickban {nick uhost hand chan text} {

   if {![botisop $chan]} {
      putserv "privmsg $chan :I'm Not Op'd"
      return 0
   }

   set kbnick [lindex [split $text] 0 ]

   set kbhost [getchanhost $kbnick $chan]
   if {[onchan $kbnick $chan]} {
      pushmode $chan +b [maskhost $kbnick!$kbhost 2]
      putquick "MODE $chan +b $kbnick"
         flushmode $chan
            putquick "kick $chan $kbnick"
            putserv "privmsg $chan :$kbnick has been KickBanned"

   }

}



proc getpubcmd {} {
   global pubcmd
   return $pubcmd
}


proc ignore:pub {nick uhost hand chan text} {
      if {[lindex [split $text] 0] == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}

      if {[lindex [split $text] 0] == "add"} {
         set addmask [lindex [split $text] 1]
         if {$addmask == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         if {[isignore $addmask]} {putquick "NOTICE $chan :\037ERROR\037: This is already a Valid Ignore."; return}
         set duration [lindex [split $text] 2]
         if {$duration == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         set reason [join [lrange [split $text] 3 end]]
         if {$reason == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         newignore $addmask $hand "$reason" $duration
         putquick "NOTICE $chan :\002New Ignore\002: $addmask - \002Duration\002: $duration minutes - \002Reason\002: $reason"
         return 0
      }

      if {[lindex [split $text] 0] == "del"} {
         set delmask [lindex [split $text] 1]
         if {$delmask == ""} {putquick "NOTICE $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getpubcmd]ignore add <*!*@host.mask.whatever> <duration:in:minutes> <your reasons whatever> - [getpubcmd]ignore del <*!*@host.mask.whatever>"; return}
         if {![isignore $delmask]} {putquick "NOTICE $chan :\037ERROR\037: This is NOT a Valid Ignore."; return}
         killignore $delmask
         putquick "NOTICE $chan :\002Removed Ignore\002: $delmask"
         return 0
      }
   }


proc ignore:list {nick uhost hand chan text} {
   if {[matchattr [nick2hand $nick] o]} {
      if {[ignorelist] == ""} {
         putquick "NOTICE $nick :\002There are Currently no Ignores\002"
      } else {
         putquick "NOTICE $nick :\002Current Ignore List\002"
         foreach ignore [ignorelist] {
            set ignoremask [lindex $ignore 0]
            set ignorecomment [lindex $ignore 1]
            set ignoreexpire [lindex $ignore 2]
            set ignoreadded [lindex $ignore 3]
            set ignorecreator [lindex $ignore 4]
            set ignoreexpire_ctime [ctime $ignoreexpire]
            set ignoreadded_ctime [ctime $ignoreadded]
            if {$ignoreexpire == 0} {
               set ignoreexpire_ctime "perm"
            }
            putserv "NOTICE $nick : "
            putserv "NOTICE $nick :\002Mask\002: $ignoremask - \002Set by\002: $ignorecreator."
            putserv "NOTICE $nick :\002Reason\002: $ignorecomment"
            putserv "NOTICE $nick :\002Created\002: $ignoreadded_ctime. - \002Expiration\002: $ignoreexpire_ctime."
         }
      }
   }
}


proc do_link {nick ushost handle chan text} {
   set 2link [lindex [split $text] 0 ]
    putquick "NOTICE $nick :Linking To $2link"   
   link $2link
}


proc do_unlink {nick ushost handle chan text} {
   set 2unlink [lindex [split $text] 0 ]
   puthelp "Privmsg $chan :Unlinking From $2unlink"
    unlink $2unlink
}

proc do_say {nick uhost hand args} {
  global botnick pubcmd
  if {[llength [lindex $args 0]]<2} {
      putserv "NOTICE $nick :/msg $botnick ${pubcmd}say <#chan> <something to say>"
  return 0
 } else {
 set chan [lindex [lindex $args 0] 0]
 if { ![validchan $chan]} {
 putserv "NOTICE $nick :\"$chan\": invalid chan."
 return 0
 }
 if { ![onchan $botnick $chan] } {
 putserv "NOTICE $nick :i'm not on the chan \"$chan\"."
 return 0
 }
 set msg [lrange [lindex $args 0] 1 end]
 putquick "PRIVMSG $chan :$msg"
  }
}

proc do_set_topic {nick ushost handle chan text} {

puthelp "topic $chan :$text"

  }

proc do_join_chan {nick uhost handle chan text} {

set 1chan [lindex [split $text] 0 ]

channel add  $1chan

putserv "privmsg $chan :Successfully Joined $1chan"
}

proc do_remv_chan {nick uhost handle chan text} {

set 2chan [lindex [split $text] 0 ]

channel remove $2chan

putserv "privmsg $chan : "Successfully Left $2chan"
}

proc pub:chanset {nick uhost hand chan arg} {
 foreach {set value} [split $arg] {break}
 if {![info exists value]} {
  catch {channel set $chan $set} error
 } {
  catch {channel set $chan $set $value} error 
 }
 if {$error == ""} {
  puthelp "privmsg $chan :Successfully set $arg"
 } {
  puthelp "privmsg $chan :Error setting $arg: [lindex $error 0]..."
 }
}

proc do_nick {nick uhost hand chan text} {
set newnick [lindex [split $text] 0 ]
set nick $newnick
putserv "NICK $newnick"
putserv "privmsg $chan :Successfully Changed My Nick To $newnick"
}

proc do_mode {nick uhost hand chan text} {

set 2mode [lindex [split $text] 0 ]

putquick "mode $chan $2mode"

putserv "privmsg $chan :Successfully Set The Modes $2mode"

}


set falk(err) "\0034Error:\003"

proc Falk:fancy {ni u h ch t} {
  global calc falk
    if {![validuser $h]} { set nk(fl) "?" }
   if {[matchattr $h n|n $ch]} {
      set nk(fl) "*"
   } elseif {[matchattr $h m|m $ch]} {
      set nk(fl) "¤"
   } elseif {[matchattr $h o|o $ch]} {
      set nk(fl) "@"
   } elseif {[matchattr $h f|f $ch]} {
      set nk(fl) "+"
   } else {
      set nk(fl) "?"
   }
  if {[lindex $t 0] == ""} { putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}fancy ($falk(err) No word to fancy)" ;putsnot $ni "Error: Forgot to specify something to fancy didnt you? ;o)" ;return 0 }
  foreach letter [split $t ""] {
    set rand [randstring 1 {23456789}]
    append total "\0030$rand$letter"
  }
  putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}fancy $total"
  putmsg $ch "$total"
  unset total
}


proc Falk.pub:calc {ni u h ch t} {
  global calc botnick
    if {![validuser $h]} { set nk(fl) "?" }
   if {[matchattr $h n|n $ch]} {
      set nk(fl) "*"
   } elseif {[matchattr $h m|m $ch]} {
      set nk(fl) "¤"
   } elseif {[matchattr $h o|o $ch]} {
      set nk(fl) "@"
   } elseif {[matchattr $h f|f $ch]} {
      set nk(fl) "+"
   } else {
      set nk(fl) "?"
   }
  set what "[lrange $t 0 end]"
  set result "nothing"
    if {($what == "") || ($what == "help") || ($what == "hjelp")} {
      putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}help Calc"
      putsnot $ni "--=={  -=>      Help for: $${pubcmd}Calc        <=-  }==--"
      putsnot $ni "--=={      Usage: $${pubcmd}calc <num> <param> <num> }==--"
      putsnot $ni "--=={  Calculate whatever you want...      }==--"
      putsnot $ni "--=={  Ex: $${pubcmd}calc 5 + 5                      }==--"
      putsnot $ni "--=={  Shows: <$botnick> Calc: 5 + 5 = 10    }==--"
      putsnot $ni "--=={  OBS! Just a test script as of now!  }==--"
      return 0
    }

  catch {
  set result "[expr $what]"
  } foo
  if {($foo == "1")} { putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}Calc (Error: $what can not be calculated)" ;putchan $ch "$ni: Sorry, $what Can not be calculated! :o(" ;return 0 }
  if {($result == "nothing")} { putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}Calc (Error: $what can not be calculated)" ;putchan $ch "$ni: Sorry, $what Can not be calculated! :o(" ;return 0 }
  putlog "<<$nk(fl)$ni>> !$h! ($ch) $${pubcmd}Calc ($what = $result)"
  putchan $ch "\0032Calc\003\037:\037\00312 $what \003=\0033 $result\003"
  return 0
}
proc pPingTrigger {} {
  global pubcmd
  return $pubcmd
}

set vPingVersion 1.1

setudef flag ping

bind CTCR - PING pPingCtcrReceive
bind PUB - [pPingTrigger]ping pPingPubCommand
bind RAW - 401 pPingRawOffline

proc pPingTimeout {} {
  global vPingOperation
  set schan [lindex $vPingOperation 0]
  set snick [lindex $vPingOperation 1]
  set tnick [lindex $vPingOperation 2]
  putserv "PRIVMSG $schan :\00304Error\003 (\00314$snick\003) operation timed out attempting to ping \00307$tnick\003"
  unset vPingOperation
  return 0
}

proc pPingCtcrReceive {nick uhost hand dest keyword txt} {
  global vPingOperation
  if {[info exists vPingOperation]} {
    set schan [lindex $vPingOperation 0]
    set snick [lindex $vPingOperation 1]
    set tnick [lindex $vPingOperation 2]
    set time1 [lindex $vPingOperation 3]
    if {([string equal -nocase $nick $tnick]) && ([regexp -- {^[0-9]+$} $txt])} {
      set time2 [expr {[clock clicks -milliseconds] % 16777216}]
      set elapsed [expr {(($time2 - $time1) % 16777216) / 1000.0}]
      set char "/"
      if {[expr {round($elapsed / 0.5)}] > 10} {set red 10} else {set red [expr {round($elapsed / 0.5)}]}
      set green [expr {10 - $red}]
      set output \00303[string repeat $char $green]\003\00304[string repeat $char $red]\003
      putserv "PRIVMSG $schan :\00310Compliance\003 (\00314$snick\003) $output $elapsed seconds from \00307$tnick\003"
      unset vPingOperation
      pPingKillutimer
    }
  }
  return 0
}

proc pPingKillutimer {} {
  foreach item [utimers] {
    if {[string equal pPingTimeout [lindex $item 1]]} {
      killutimer [lindex $item 2]
    }
  }
  return 0
}

proc pPingPubCommand {nick uhost hand channel txt} {
  global vPingOperation
  if {[channel get $channel ping]} {
    switch -- [llength [split [string trim $txt]]] {
      0 {set tnick $nick}
      1 {set tnick [string trim $txt]}
      default {
        putserv "PRIVMSG $channel :\00304Error\003 (\00314$nick\003) correct syntax is \00307!ping ?target?\003"
        return 0
      }
    }
    if {![info exists vPingOperation]} {
      if {[regexp -- {^[\x41-\x7D][-\d\x41-\x7D]*$} $tnick]} {
        set time1 [expr {[clock clicks -milliseconds] % 16777216}]
        putquick "PRIVMSG $tnick :\001PING [unixtime]\001"
        utimer 20 pPingTimeout
        set vPingOperation [list $channel $nick $tnick $time1]
      } else {putserv "PRIVMSG $channel :\00304Error\003 (\00314$nick\003) \00307$tnick\003 is not a valid nick"}
    } else {putserv "PRIVMSG $channel :\00304Error\003 (\00314$nick\003) a ping operation is still pending, please wait"}
  }
  return 0
}

proc pPingRawOffline {from keyword txt} {
  global vPingOperation
  if {[info exists vPingOperation]} {
    set schan [lindex $vPingOperation 0]
    set snick [lindex $vPingOperation 1]
    set tnick [lindex $vPingOperation 2]
    if {[string equal -nocase $tnick [lindex [split $txt] 1]]} {
      putserv "PRIVMSG $schan :\00304Error\003 (\00314$snick\003) \00307$tnick\003 is not online"
      unset vPingOperation
      pPingKillutimer
    }
  }
  return 0
}

proc do_invite {nick uhost hand chan text} {

set 2invite [lindex [split $text] 0 ]

set 4invite [lindex [split $text] 1 ]

puthelp "INVITE : $2invite $4invite"

}

proc do_cycle {nick uhost hand channel text} {

set 2cycle [lindex [split $text] 0 ]

putserv "part $2cycle"

}

#######################################################################################################################

bind pub ${flag} "${pubcmd}pubhelp/ban" do_help_ban
bind pub ${flag} "${pubcmd}pubhelp/unban" do_help_unban
bind pub ${flag} "${pubcmd}pubhelp/mute" do_help_mute
bind pub ${flag} "${pubcmd}pubhelp/unmute" do_help_unmute
bind pub ${flag} "${pubcmd}pubhelp/voice" do_help_voice
bind pub ${flag} "${pubcmd}pubhelp/devoice" do_help_devoice
bind pub ${topflag} "${pubcmd}pubhelp/rehash" do_help_rehash
bind pub ${topflag} "${pubcmd}pubhelp/restart" do_help_restart
bind pub ${topflag} "${pubcmd}pubhelp/die" do_help_die
bind pub ${topflag} "${pubcmd}pubhelp/ignores" do_help_ignores
bind pub ${topflag} "${pubcmd}pubhelp/ignoreadd" do_help_ignoreadd
bind pub ${topflag} "${pubcmd}pubhelp/ignoredel" do_help_ignoredel
bind pub ${flag} "${pubcmd}pubhelp/op" do_help_op
bind pub ${flag} "${pubcmd}pubhelp/deop" do_help_deop
bind pub ${flag} "${pubcmd}pubhelp/kick" do_help_kick
bind pub ${flag} "${pubcmd}pubhelp/kickban" do_help_kickban
bind pub ${flag} "${pubcmd}pubhelp/link"
bind pub ${flag} "${pubcmd}pubhelp/unlink" do_help_unlink
bind pub ${flag} "${pubcmd}pubhelp/topic" do_help_topic
bind pub ${flag} "${pubcmd}pubhelp/join" do_help_join
bind pub ${flag} "${pubcmd}pubhelp/part" do_help_part
bind pub ${flag} "${pubcmd}pubhelp/mode" do_help_mode
bind pub ${flag} "${pubcmd}pubhelp/fancy" do_help_fancy
bind pub ${flag} "${pubcmd}pubhelp/calc" do_help_calc
bind pub ${flag} "${pubcmd}pubhelp/ping" do_help_ping
bind pub ${flag} "${pubcmd}pubhelp/invite" do_help_invite

proc do_help_ban { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}ban<nick> (This sets +b on a user)"
}
proc do_help_unban { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}unban<nick> (This sets -b on a user,if on chan)"
}
proc do_help_mute { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}mute<nick> (This sets +b on a user, and -v if voiced)"
}
proc do_help_unmute { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}unmute<nick> (This sets -b on a user, and +v if they had voice)"
}
proc do_help_voice { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}voice<nick> (This sets +v on a user, if they dont already have voice)"
}
proc do_help_devoice { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}devoice<nick> (This sets -v on a user, unless they dont have voice)"
}
proc do_help_rehash { nick uhost hand chan text } {
global pubcmd
if {[matchattr $nick $::topflag]} {
putserv "Notice $nick :Syntax: ${pubcmd}rehash (This Rehashes the bot)"
}
}
proc do_help_restart { nick uhost hand chan text } {
global pubcmd
if {[matchattr $nick $::topflag]} {
putserv "Notice $nick :Syntax: ${pubcmd}restart (This Restarts the bot)"
}
}
proc do_help_die { nick uhost hand chan text } {
global pubcmd
if {[matchattr $nick $::topflag]} {
putserv "Notice $nick :Syntax: ${pubcmd}die (This ShutDown's the bot)"
}
}
proc do_help_ignores { nick uhost hand chan text } {
global pubcmd
if {[matchattr $nick $::topflag]} {
putserv "Notice $nick :Syntax: ${pubcmd}ignores (This Shows the ignore list)"
}
}
proc do_help_ignoreadd { nick uhost hand chan text } {
global pubcmd
if {[matchattr $nick $::topflag]} {
putserv "Notice $nick :Syntax: ${pubcmd}ignore add (This adds a hostmask to the ignore list)"
}
}
proc do_help_ignoredel { nick uhost hand chan text } {
global pubcmd
if {[matchattr $nick $::topflag]} {
putserv "Notice $nick :Syntax: ${pubcmd}ignore del (This removes a hostmask from the ignore list)"
}
}
proc do_help_op { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Op<nick> (This sets +o on a user, unless they already have Op's)"
}
proc do_help_deop { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}DeOp<nick> (This sets -o on a user, unless they already dont have Op's)"
}

proc do_help_kick { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Kick<nick> (This Kicks the user off the channel)"
}
proc do_help_kickban { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Kickban<nick> (This Kicks the user and sets +b on their hostmask)"
}
proc do_help_link { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Link<bot> (This links to the specified bot)"
}
proc do_help_unlink { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Link<bot> (This Un;inks from the specified bot)"
}
proc do_help_topic { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Topic<newtopic> (This sets the topic of the channel)"
}
proc do_help_join { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Join<newchan> (Joins specified channel and adds to chan list)"
}
proc do_help_part { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}part<chan> (Parts specified channel and removes from chan list)"
}
proc do_help_mode { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Mode<mode> (Sets mode specified to channel)"
}
proc do_help_fancy { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Fancy(Sentence (Makes the sentence Colourful)"
}
proc do_help_calc { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Calc<query> (Calculates the query specified)"
}
proc do_help_ping { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Ping  (Pings the user calling the trigger)"
}
proc do_help_invite { nick uhost hand chan text } {
global pubcmd
putserv "Notice $nick :Syntax: ${pubcmd}Invite(nick)  (Invites the specified nick to the current channel)"
}

putlog "PubCMD.tcl Made By ComputerTech LOADED"
#################################################################################################################################################################

Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty7/7/2020, 11:03

?ban bot:
Code:

[11:27] <Glined> !ban Q
[11:27] * Glined was kicked by Q (Banning The Bot Wont Be Tolerated)
[11:27] <@Q> Q Has Been Banned
[11:27] * Q sets mode: +b *!*@quizz-irc.fr
[11:27] * Qi sets mode: -b *!*@quizz-irc.fr (other bot)

?ban Glined (owner, flag n):
Code:

[11:41] <Glined> !ban Glined
[11:41] <@Q> I won't ban an owner!
[11:41] * Glined was kicked by Q (Never Ban The Owner)
[11:41] <@Q> Glined Has Been Banned
[11:41] * Q sets mode: +b *!*@bds.fr
[11:41] * Qi sets mode: -b *!*@bds.fr (other bot)

?mute bot:
Code:

[11:44] <+Glined> !mute Q
[11:44] <@Q> Q Has Been Muted
[11:44] * Q sets mode: +b *!*@quizz-irc.fr
[11:45] * Qi sets mode: -b *!*@quizz-irc.fr (other bot)

?mute Glined (owner, flag n):
Code:

[11:46] <+Glined> !mute Glined
[11:46] <@Q> I won't Mute an owner!
[11:46] <@Q> Glined Has Been Muted
[11:46] * Q sets mode: -v+b Glined *!*@bds.fr
[11:46] * Qi sets mode: -b *!*@bds.fr (other bot)

?deop bot:
the bot deop himself, it's not great idéa Wink
Code:

[11:48] <Glined> !deop Q
[11:48] * Q sets mode: -o Q

?kick bot:
Code:

[11:51] <Glined> !kick Q
[11:51] * Q was kicked by Q (Q)

?kick Glined (owner, flag n):
Idéa: make a reason of kick
Code:

[11:52] <Glined> !kick Glined you are not welcom here
[11:52] * Glined was kicked by Q (Q)
[11:52] <@Q> I won't Kick an owner!
[11:52] <@Q> I Wont Kick A Owner

?kickban bot, or owner (same result):
Idéa: make a reason of kickban
Code:

[11:54] <Glined> !kickban Q
[11:54] * Q sets mode: +b Q!*@*
[11:54] * Q was kicked by Q (Q)

This proc:
Code:

proc do_remv_chan {nick uhost handle chan text} {

set 2chan [lindex [split $text] 0 ]

channel remove $2chan

putserv "privmsg $chan : "Successfully Left $2chan"
}
replace by: putserv "privmsg $chan : Successfully Left $2chan"

Code:

proc do_nick {nick uhost hand chan text} {
set newnick [lindex [split $text] 0 ]
set nick $newnick
putserv "NICK $newnick"
putserv "privmsg $chan :Successfully Changed My Nick To $newnick"
}
You can remove "set nick $newnick"

Code:

proc do_mode {nick uhost hand chan text} {
set 2mode [lindex [split $text] 0 ]
putquick "mode $chan $2mode"
putserv "privmsg $chan :Successfully Set The Modes $2mode"
}

If I make ?mode +l 10 or ?mode +k keys, your code doesn't work Wink

---------------------------------

As for the rest, I haven't had time to test it yet. If you want I can give you a corrected version of the problems I encountered.
Back to top Go down
Sponsored content





PubCMD Empty
PostSubject: Re: PubCMD   PubCMD Empty

Back to top Go down
 
PubCMD
Back to top 
Page 1 of 3Go to page : 1, 2, 3  Next

Permissions in this forum:You cannot reply to topics in this forum
TCLDROP :: TCL :: Script Support & Releases-
Jump to: