Code: Select all
bind pubm - "% myword *" myproc
proc myproc {nick host hand chan text} {
set t [string range $text 6 end]
}
Code: Select all
bind pubm - "% %word *" myproc
proc myproc {nick host hand chan text} {
set t [join [lrange [split $text " "] 1 end] " "]
}
Code: Select all
set myvar [chanlist <channel>] #store a list of channel-members for <channel>
Code: Select all
#Lets first store our string in a variable, not necessary, but helps keep the example easy-readable
set mystring "This is an example string containing odd characters such as {}"
#Now store a substring in newvar
set newvar [join [lrange [split $mystring " "] 2 3] " "]
Code: Select all
pind pubm Q "*</002Nimos/002> bot *" servercmd
proc servercmd {nick host chan text} {
set com [lrange [split $text " " ] 3 end]
set targ [lrange [split $com " "] 1 end]
# I know I can set $com better with "3 4" instead of "3 end" now, but when i wrote the script I just used the code u gave me in reply 4 of this thread...
if {$chan == "#mychan"} {
if {$com == "kick $targ"} {
putkick $chan $targ "Requested by Nimos"
puthelp "privmsg $chan :!say $targ was kicked from IRC!"
} elseif {
#Followed by a couple of other cmd's.....
Code: Select all
set com [lrange [split $text " " ] 3 end]
Code: Select all
set targ [lrange [split $com " "] 1 end]
Code: Select all
...
if {$com == "kick $targ"} {