Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##### Script Name : Public Commands Not Requiring Ops
- ##### Script Version : NK0004.0.tcl
- ##### Edited & Bug Fixed By : Kyros Koh (i.am@kyroskoh.com)
- ##### Pre-Loaded Settings #####
- putlog "NK0004.tcl Loaded. Functions Enabled..."
- set die ""
- ###################################### Edit Below #########################################
- ##### Bind Command (Edit Only The Flags Below. Format: global|channel) #####
- ##### Comment Out Commands That You Do Not Want To Use #####
- ##### You Can Change The Command Name #####
- bind msg n|- die NK0004-msg:die
- bind pub n|- !rehash NK0004-pub:!rehash
- bind pub n|- !restart pub:!restart
- bind pub n|- !uptime NK0004-pub:!uptime
- bind pub n|- !jump NK0004-pub:!jump
- bind pub n|- !server NK0004-pub:!server
- bind pub n|- !part NK0004-pub:!part
- bind pub n|- !partall NK0004-pub:!partall
- bind pub n|- !channels NK0004-pub:!channels
- bind pub n|- !address NK0004-pub:!address
- bind pub n|- !modes NK0004-pub:!modes
- bind pub n|- !die NK0004-pub:!die
- bind pub n|- !chattr NK0004-pub:!chattr
- bind pub n|- !adduser NK0004-pub:!adduser
- bind pub n|- !deluser NK0004-pub:!deluser
- bind pub n|- !addhost NK0004-pub:!addhost
- bind pub n|- !delhost NK0004-pub:!delhost
- bind pub n|- !delallhosts NK0004-pub:!delallhosts
- bind pub n|- !hosts NK0004-pub:!hosts
- bind pub n|- !botattr NK0004-pub:!botattr
- bind pub n|- !addbot NK0004-pub:!addbot
- bind pub n|- !delbot NK0004-pub:!delbot
- bind pub n|- !flags NK0004-pub:!flags
- bind pub n|- !join NK0004-pub:!join
- bind pub n|- !say NK0004-pub:!say
- bind pub n|- !action NK0004-pub:!action
- bind pub n|- !notice NK0004-pub:!notice
- bind pub n|- !cycle NK0004-pub:!cycle
- bind pub n|- !save NK0004-pub:!save
- bind pub n|- !link NK0004-pub:!link
- bind pub n|- !unlink NK0004-pub:!unlink
- bind pub n|- !bots NK0004-pub:!bots
- bind pub n|- !load NK0004-pub:!reload
- bind pub n|- !time NK0004-pub:!time
- bind pub n|- !away NK0004-pub:!away
- bind pub n|- !back NK0004-pub:!back
- bind pub n|- !nick NK0004-pub:!nick
- bind pub n|- !msg NK0004-pub:!msg
- ##### You Can Change The Command Name #####
- ##### Comment Out Commands That You Do Not Want To Use #####
- ##### Bind Command (Edit Only The Flags Above. Format: global|channel) #####
- ###################################### Edit Above #########################################
- ##### Rehash Command #####
- proc NK0004-pub:!rehash { nickname userhost handle channel text } {
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax !rehash"
- } else {
- rehash
- putquick "NOTICE $nickname : Rehashing In Progress..."
- }
- }
- ##### Restart Command #####
- proc NK0004-pub:!restart { nickname userhost handle channel text } {
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !restart"
- } else {
- putquick "NOTICE $nickname : Restarting In Progress..."
- restart
- }
- }
- ##### Uptime Command #####
- proc NK0004-pub:!uptime { nickname userhost handle channel text } {
- global botnick uptime
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !uptime"
- } else {
- putquick "NOTICE $nickname : Uptime For $botnick: [duration [expr [unixtime] - $uptime]]"
- }
- }
- ##### Jump Server Command #####
- proc NK0004-pub:!jump { nickname userhost handle channel text } {
- if { [llength $text] > 3 } {
- putquick "NOTICE $nickname : Syntax : !jump \[server\] \[port\] \[password\]"
- } else {
- putquick "NOTICE $nickname : Jumping Servers..."
- jump [lindex $text 0] [lindex $text 1] [lindex $text 2]
- }
- }
- ##### Show Server Command #####
- proc NK0004-pub:!server { nickname userhost handle channel text } {
- global botnick server
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !server"
- } else {
- putquick "NOTICE $nickname : $botnick Is Currently Connected On $server"
- }
- }
- ##### Part Channel Command #####
- proc NK0004-pub:!part { nickname userhost handle channel text } {
- global botnick
- if { [llength $text] > 1 } {
- putquick "NOTICE $nickname : Syntax : !part \[#channel\]"
- } else {
- if { [llength $text] == 0 } {
- putquick "NOTICE $nickname : Parting Channel And Removingn Records For $channel In Progress"
- channel remove $channel
- } else {
- if { [string match "#*" [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Please Enter A Valid Channel Name"
- } else {
- putquick "NOTICE $nickname : Parting Channel And Removing Records For [lindex $text 0] In Progress"
- channel remove [lindex $text 0]
- }
- }
- }
- }
- ##### Part All Channels Command #####
- proc NK0004-pub:!partall { nickname userhost handle channel text } {
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax !partall"
- } else {
- putquick "NOTICE $nickname : Parting All Channels In Progress"
- for { set i 0 } { $i < [llength [channels]] } { incr i } {
- channel remove [lindex [channels] $i]
- }
- }
- }
- ##### List Channels Command #####
- proc NK0004-pub:!channels { nickname userhost handle channel text } {
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !channels"
- } else {
- set chan ""
- set modes ""
- for { set channels 0 } { $channels < [llength [channels]] } { incr channels } {
- if { [botonchan [lindex [channels] $channels]] == 1 } {
- if { [botisop [lindex [channels] $channels]] == 1 } {
- set modes "@"
- }
- if { [botisvoice [lindex [channels] $channels]] == 1 } {
- set modes "${modes}+"
- }
- set chan "$chan ${modes}[lindex [channels] $channels]"
- set modes ""
- }
- }
- putquick "NOTICE $nickname : I Am On ([llength $chan]) Channel(s): $chan"
- }
- }
- ##### Show Address Command #####
- proc NK0004-pub:!address { nickname userhost handle channel text } {
- global botnick
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !address"
- } else {
- putquick "NOTICE $nickname : $botnick Is Under The Address ${botnick}![getchanhost $botnick]"
- }
- }
- ##### Modes Of Channel Command #####
- proc NK0004-pub:!modes { nickname userhost handle channel text } {
- if { [llength $text] > 0 } {
- putquick "NOTICE $nickname : Syntax : !modes"
- } else {
- set total 0
- set ops 0
- set voice 0
- set reg 0
- for { set i 0 } { $i < [llength [chanlist $channel]] } { incr i } {
- if { [isop [lindex [chanlist $channel] $i] $channel] == 1 && [isvoice [lindex [chanlist $channel] $i] $channel] == 1 } {
- incr total
- incr ops
- incr voice
- }
- if { [isop [lindex [chanlist $channel] $i] $channel] == 1 && [isvoice [lindex [chanlist $channel] $i] $channel] == 0 } {
- incr total
- incr ops
- }
- if { [isop [lindex [chanlist $channel] $i] $channel] == 0 && [isvoice [lindex [chanlist $channel] $i] $channel] == 1 } {
- incr total
- incr voice
- }
- if { [isop [lindex [chanlist $channel] $i] $channel] == 0 && [isvoice [lindex [chanlist $channel] $i] $channel] == 0 } {
- incr total
- incr reg
- }
- }
- putquick "NOTICE $nickname : Modes For $channel : [getchanmode $channel]; Total: $total/$total; Ops: $ops/$total; Voice: $voice/$total; Reg: $reg/$total; Bans: [llength [chanbans $channel]]"
- }
- }
- ##### Disconnect Command #####
- proc NK0004-pub:!die { nickname userhost handle channel text } {
- global die botnick
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !die"
- } else {
- if { $die == "" } {
- set die [rand 99999]
- putquick "NOTICE $nickname : Are You Sure You Want To Disconnect $botnick? If Yes, Please Type /msg $botnick die <password> $die. If Not, Type !die Again"
- } elseif { $die != "" } {
- set die ""
- putquick "NOTICE $nickname : Disconnect Procedure Terminated"
- }
- }
- }
- proc NK0004-msg:die { nickname userhost handle text } {
- global die botnick
- if { [llength $text] == 0 } {
- if { $die == "" } {
- set die [rand 99999]
- putquick "NOTICE $nickname : Are You Sure You Want To Disconnect $botnick? If Yes, Please Type /msg $botnick die <password> $die. If Not, Type /msg $botnick die Again"
- } elseif { $die != "" } {
- set die ""
- putquick "NOTICE $nickname : Disconnect Procedure Terminated"
- }
- } elseif { [llength $text] == 2 } {
- if { [lindex $text 1] == $die && [passwdok $handle [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : Disconnect Procedure Completed. Disconnecting Now..."
- die "Requested By Owner"
- } else {
- putquick "NOTICE $nickname : Incorrect Password. You Would Have To Repeat The Whole Process Again"
- set die ""
- }
- } else {
- putquick "NOTICE $nickname : Syntax : /msg $botnick die <password> <die>"
- }
- }
- ##### Change Attributes Of User Command #####
- proc NK0004-pub:!chattr { nickname userhost handle channel text } {
- if { [llength $text] > 3 || [llength $text] < 1 } {
- putquick "NOTICE $nickname : Syntax : !chattr <handle> \[global attributes|channel attributes\] \[#channel\]"
- } else {
- if { [validuser [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : [lindex $text 0] Is Not A Valid User"
- } else {
- if { [llength $text] == 1 } {
- if { [chattr [lindex $text 0]] == "-" } {
- putquick "NOTICE $nickname : No Global Attributes For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Global Attributes For [lindex $text 0] Are [chattr [lindex $text 0]]"
- }
- }
- if { [llength $text] == 2 } {
- if { [string match "#*" [lindex $text 1]] == 1 } {
- if { [string match "*|-" [chattr [lindex $text 0] [lindex $text 2]]] == 1 } {
- putquick "NOTICE $nickname : No [lindex $text 2] Attributes For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : [lindex $text 1] Attributes For [lindex $text 0] Are [chattr [lindex $text 0] [lindex $text 1]]"
- }
- } else {
- chattr [lindex $text 0] [lindex $text 1]
- if { [chattr [lindex $text 0]] == "-" } {
- putquick "NOTICE $nickname : No Global Attributes For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Global Attributes For [lindex $text 0] Are : [chattr [lindex $text 0]]"
- }
- }
- }
- if { [llength $text] == 3 } {
- if { [string match "#*" [lindex $text 2]] == 0 } {
- putquick "NOTICE $nickname : Syntax : !chattr <handle> \[global attributes|channel attributes\] \[channel\]"
- } else {
- chattr [lindex $text 0] [lindex $text 1] [lindex $text 2]
- if { [string match "*|-" [chattr [lindex $text 0] [lindex $text 2]]] == 1 } {
- putquick "NOTICE $nickname : No [lindex $text 2] Attributes For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : [lindex $text 2] Attributes For [lindex $text 0] Are : [chattr [lindex $text 0] [lindex $text 2]]"
- }
- }
- }
- }
- }
- }
- ##### Add User Command #####
- proc NK0004-pub:!adduser { nickname userhost handle channel text } {
- if { [llength $text] == 0 || [llength $text] > 2 } {
- putquick "NOTICE $nickname : Syntax : !adduser <handle> \[userhost|AUTO\]"
- } else {
- if { [validuser [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : User - [lindex $text 0] Already Exists"
- } else {
- if { [llength $text] == 1 } {
- adduser [lindex $text 0]
- putquick "NOTICE $nickname : Added [lindex $text 0] To Bot With No Userhost"
- }
- if { [llength $text] == 2 } {
- if { [string match -nocase "AUTO" [lindex $text 1]] == 1 } {
- if { [maskhost [getchanhost [lindex $text 0]]] == "*!*@" } {
- adduser [lindex $text 0]
- putquick "NOTICE $nickname : Added [lindex $text 0] To Bot With No Userhost"
- } else {
- adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0]]]
- putquick "NOTICE $nickname : Added [lindex $text 0] To Bot With Userhost : [maskhost [getchanhost [lindex $text 0]]]"
- }
- } else {
- if { [string match "*!*@*" [lindex $text 1]] == 0 } {
- adduser [lindex $text 0]
- putquick "NOTICE $nickname : Added [lindex $text 0] To Bot With No Userhost"
- } else {
- adduser [lindex $text 0] [lindex $text 1]
- putquick "NOTICE $nickname : Added [lindex $text 0] To Bot With Userhost : [lindex $text 1]"
- }
- }
- }
- }
- }
- }
- ##### Delete User Command #####
- proc NK0004-pub:!deluser { nickname userhost handle channel text } {
- if { [llength $text] != 1 } {
- putquick "NOTICE $nickname : Syntax : !deluser <handle>"
- } else {
- if { [validuser [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : User - [lindex $text 0] Does Not Exist"
- } else {
- deluser [lindex $text 0]
- putquick "NOTICE $nickname : Deleted [lindex $text 0] From Bot"
- }
- }
- }
- ##### Add Host Command #####
- proc NK0004-pub:!addhost { nickname userhost handle channel text } {
- if { [llength $text] != 2 } {
- putquick "NOTICE $nickname : Syntax : !addhost <handle> <userhost>"
- } else {
- if { [validuser [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Invalid Handle - [lindex $text 0]"
- } else {
- if { [string match "*!*@*" [lindex $text 1]] == 0 } {
- putquick "NOTICE $nickname : Invalid Address Format"
- } else {
- setuser [lindex $text 0] hosts [lindex $text 1]
- putquick "NOTICE $nickname : Added Host - [lindex $text 1] For [lindex $text 0]"
- }
- }
- }
- }
- ##### Delete Host Command #####
- proc NK0004-pub:!delhost { nickname userhost handle channel text } {
- if { [llength $text] != 2 } {
- putquick "NOTICE $nickname : Syntax : !delhost <handle> <userhost>"
- } else {
- if { [validuser [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Invalid Handle"
- } else {
- if { [delhost [lindex $text 0] [lindex $text 1]] == 1 } {
- putquick "NOTICE $nickname : Deleted Host - [lindex $text 1] From [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Host Does Not Exist For [lindex $text 0]"
- }
- }
- }
- }
- ##### Delete All Hosts Of User Command #####
- proc NK0004-pub:!delallhosts { nickname userhost handle channel text } {
- if { [llength $text] != 1 } {
- putquick "NOTICE $nickname : Syntax : !delallhosts <handle>"
- } else {
- if { [validuser [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Invalid Handle - [lindex $text 0]"
- } else {
- setuser [lindex $text 0] hosts
- putquick "NOTICE $nickname : Deleted All Hosts For [lindex $text 0]"
- }
- }
- }
- ##### List Hosts Of User Command #####
- proc NK0004-pub:!hosts { nickname userhost handle channel text } {
- if { [llength $text] > 1 } {
- putquick "NOTICE $nickname : Syntax : !hosts \[handle\]"
- } else {
- if { [llength $text] == 1 } {
- if { [validuser [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Invalid Handle - [lindex $text 0]"
- } else {
- if { [llength [getuser [lindex $text 0] hosts]] == 0 } {
- putquick "NOTICE $nickname : No Hosts Set For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Hosts For [lindex $text 0] ([llength [getuser [lindex $text 0] hosts]]) : [getuser [lindex $text 0] hosts]"
- }
- }
- } else {
- putquick "NOTICE $nickname : Hosts For $handle (You) : ([llength [getuser $handle hosts]]) : [getuser $handle hosts]"
- }
- }
- }
- ##### Change Bot Attributes Command #####
- proc NK0004-pub:!botattr { nickname userhost handle channel text } {
- if { [llength $text] > 2 || [llength $text] < 1 } {
- putquick "NOTICE $nickname : Syntax : !botattr <handle> \[attributes\]"
- } else {
- if { [validuser [lindex $text 0]] == 0 && [matchattr [lindex $text 0] b] == 1 } {
- putquick "NOTICE $nickname : [lindex $text 0] Is Not A Valid Bot"
- } else {
- if { [llength $text] == 1 } {
- if { [botattr [lindex $text 0]] == "-" } {
- putquick "NOTICE $nickname : No Bot Attributes For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Bot Attributes For [lindex $text 0] Are [botattr [lindex $text 0]]"
- }
- }
- if { [llength $text] == 2 } {
- botattr [lindex $text 0] [lindex $text 1]
- if { [botattr [lindex $text 0]] == "-" } {
- putquick "NOTICE $nickname : No Bot Attributes For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Bot Attributes For [lindex $text 0] Are : [botattr [lindex $text 0]]"
- }
- }
- }
- }
- }
- ##### Add Bot Command #####
- proc NK0004-pub:!addbot { nickname userhost handle channel text } {
- if { [llength $text] != 2 } {
- putquick "NOTICE $nickname : Syntax : !addbot <handle> <address>\[:port\]"
- } else {
- if { [validuser [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : Handle - [lindex $text 0] Already Exists"
- } else {
- addbot [lindex $text 0] [lindex $text 1]
- putquick "NOTICE $nickname : Added Bot ([lindex $text 0]) With Address - [lindex $text 1]"
- }
- }
- }
- ##### Delete Bot Command #####
- proc NK0004-pub:!delbot { nickname userhost handle channel text } {
- if { [llength $text] != 1 } {
- putquick "NOTICE $nickname : Syntax : !delbot <handle>"
- } else {
- if { [validuser [lindex $text 0]] == 0 || [matchattr [lindex $text 0] b] == 0 } {
- putquick "NOTICE $nickname : [lindex $text 0] Is Not A Valid User Or Is Not A Bot"
- } else {
- deluser [lindex $text 0]
- putquick "NOTICE $nickname : Deleted Bot - [lindex $text 0] From Bot Records"
- }
- }
- }
- ##### Flags Of User Command #####
- proc NK0004-pub:!flags { nickname userhost handle channel text } {
- if { [llength $text] > 1 } {
- putquick "NOTICE $nickname : Syntax : !flags \[handle\]"
- } else {
- if { [llength $text] == 1 } {
- if { [validuser [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : [lindex $text 0] Is An Invalid Handle"
- } else {
- if { [chattr [lindex $text 0]] == "-" } {
- putquick "NOTICE $nickname : No Global Flags For [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Global Flags For [lindex $text 0] : [chattr [lindex $text 0]]"
- }
- }
- } else {
- if { [chattr $handle] == "-" } {
- putquick "NOTICE $nickname : No Global Flags For $handle (You)"
- } else {
- putquick "NOTICE $nickname : Global Flags For $handle (You) : [chattr $handle]"
- }
- }
- }
- }
- ##### Join Channel Command #####
- proc NK0004-pub:!join { nickname userhost handle channel text } {
- global botnick
- if { [llength $text] > 2 || [llength $text] == 0 } {
- putquick "NOTICE $nickname : Syntax : !join <#channel> \[key\]"
- } else {
- if { [string match -nocase "* [lindex $text 0] *" " [channels] "] == 1 && [botonchan [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : Bot ($botnick) Is Already On [lindex $text 0]"
- } else {
- if { [string match "#*" [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Please Enter A Valid Channel Name"
- } else {
- putquick "NOTICE $nickname : Joining Channel - [lindex $text 0] In Progress"
- channel add [lindex $text 0]
- if { [llength $text] == 2 } {
- putquick "JOIN [lindex $text 0] [lindex $text 1]"
- }
- }
- }
- }
- }
- ##### Say Command #####
- proc NK0004-pub:!say { nickname userhost handle channel text } {
- putquick "PRIVMSG $channel : $text"
- putquick "NOTICE $nickname : Saying To $channel : $text"
- }
- ##### Action Command #####
- proc NK0004-pub:!action { nickname userhost handle channel text } {
- if { [llength $text] == 0 } {
- putquick "NOTICE $nickname : !action <text>"
- } else {
- putquick "PRIVMSG $channel :ACTION $text"
- putquick "NOTICE $nickname : Action To $channel : $text"
- }
- }
- ##### Notice Command #####
- proc NK0004-pub:!notice { nickname userhost handle channel text } {
- putquick "NOTICE $channel : $text"
- putquick "NOTICE $nickname : Notice To $channel : $text"
- }
- ##### Cycle Command #####
- proc NK0004-pub:!cycle { nickname userhost handle channel text } {
- global botnick
- if { [llength $text] > 1 } {
- putquick "NOTICE $nickname : Syntax : !cycle \[#channel\]"
- } else {
- if { [llength $text] == 0 } {
- putquick "NOTICE $nickname : Cycling $channel In Progress"
- putquick "PART $channel"
- putquick "JOIN $channel"
- } else {
- if { [string match "#*" [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Please Enter A Valid Channel Name"
- } else {
- if { [string match -nocase "* [lindex $text 0] *" " [channels] "] == 0 || [botonchan [lindex $text 0]] == 0 } {
- putquick "NOTICE $nickname : Bot ($botnick) Is Not On [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Cycling [lindex $text 0] In Progress"
- putquick "PART [lindex $text 0]"
- putquick "JOIN [lindex $text 0]"
- }
- }
- }
- }
- }
- ##### Save Userfile And Channel File Command #####
- proc NK0004-pub:!save { nickname userhost handle channel text } {
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !save"
- } else {
- putquick "NOTICE $nickname : Saving Userfile And Channel File In Progress"
- save
- }
- }
- ##### Link To Bot Command #####
- proc NK0004-pub:!link { nickname userhost handle channel text } {
- if { [llength $text] < 1 || [llength $text] > 2 } {
- putquick "NOTICE $nickname : Syntax : !link \[via-bot\] <bot>"
- } else {
- if { [llength $text] == 1 } {
- if { [link [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : Attempting To Link To [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Failed Attempt To Link To [lindex $text 0]"
- }
- } else {
- if { [link [lindex $text 0] [lindex $text 1]] == 1 } {
- putquick "NOTICE $nickname : Via-bot ([lindex $text 0]) Attempting To Link To [lindex $text 1]"
- } else {
- putquick "NOTICE $nickname : Failed Attempt By Via-bot ([lindex $text 0]) To Link To [lindex $text 1]"
- }
- }
- }
- }
- ##### Unlink From Bot Command #####
- proc NK0004-pub:!unlink { nickname userhost handle channel text } {
- if { [llength $text] != 1 } {
- putquick "NOTICE $nickname : Syntax : !unlink <bot>"
- } else {
- if { [unlink [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : Successful Unlink From [lindex $text 0]"
- } else {
- putquick "NOTICE $nickname : Unsuccessful Unlink From [lindex $text 0]"
- }
- }
- }
- ##### List Linked Bots Command #####
- proc NK0004-pub:!bots { nickname userhost handle channel text } {
- global botnick
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !bots"
- } else {
- if { [bots] == "" } {
- putquick "NOTICE $nickname : No Bots Linked To Me ($botnick) "
- } else {
- putquick "NOTICE $nickname : Bots Linked To Me ($botnick) ([llength [bots]]) : [bots]"
- }
- }
- }
- ##### Reload Userfile And Channel Command #####
- proc NK0004-pub:!reload { nickname userhost handle channel text } {
- if { [llength $text] > 1 } {
- putquick "NOTICE $nickname : Syntax : !load \[USERFILE/CHANNELS\]"
- } else {
- if { [llength $text] == 0 } {
- putquick "NOTICE $nickname : Reloading Userfile And Channel File In Progress..."
- reload
- loadchannels
- } else {
- if { [string match -nocase "USERFILE" [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : Reloading Userfile In Progress..."
- reload
- } elseif { [string match -nocase "CHANNELS" [lindex $text 0]] == 1 } {
- putquick "NOTICE $nickname : Reloading Channel File In Progress..."
- loadchannels
- } else {
- putquick "NOTICE $nickname : Syntax : !load \[USERFILE/CHANNELS\]"
- }
- }
- }
- }
- ##### Show Time Command #####
- proc NK0004-pub:!time { nickname userhost handle channel text } {
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !time"
- } else {
- putquick "NOTICE $nickname : Current Time Is : [ctime [unixtime]]"
- }
- }
- ##### Away Command #####
- proc NK0004-pub:!away { nickname userhost handle channel text } {
- global botnick
- if { [llength $text] == 0 } {
- putquick "NOTICE $nickname : Syntax : !away <reason>"
- } else {
- putquick "NOTICE $nickname : I ($botnick) Am Being Marked As Away : $text"
- putquick "AWAY : $text"
- }
- }
- ##### Back Command #####
- proc NK0004-pub:!back { nickname userhost handle channel text } {
- global botnick
- if { [llength $text] != 0 } {
- putquick "NOTICE $nickname : Syntax : !back"
- } else {
- putquick "NOTICE $nickname : I ($botnick) Am Not Longer Being Marked As Away"
- putquick "Away"
- }
- }
- ##### Nick Change Command #####
- proc NK0004-pub:!nick { nickname userhost handle channel text } {
- if { [llength $text] != 1 } {
- putquick "NOTICE $nickname : Syntax : !nick <newnick>"
- } else {
- set nick "[lindex $text 0]"
- putquick "NOTICE $nickname : Attempting To Change Nickname To : [lindex $text 0]"
- }
- }
- ##### Message Target Command #####
- proc NK0004-pub:!msg { nickname userhost handle channel text } {
- if { [llength $text] == 0 } {
- putquick "NOTICE $nickname : Syntax : !msg <target> \[message\]"
- } else {
- putquick "PRIVMSG [lindex $text 0] : [lrange $text 1 end]"
- putquick "NOTICE $nickname : Messaging To [lindex $text 0] : [lrange $text 1 end]"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement