the server raw reply is:Reynaldo wrote:I need ascript, that can detect the specific username of everynick join #
only the first character the username, the character is "space"
ex: ytfwtj is ~zfmq@hots.domain * yohxrtru
fist character the username is "space", so the bot can kick out!!
Thanks,
Code: Select all
tcl: evaluate (.tcl): join [lrange [split "server.com 311 botnick whoisednick ident the.host.com * : Username: I am cool" :] 1 end] :
Tcl: Username: I am cool
tcl: evaluate (.tcl): join [lrange [split "server.com 311 botnick whoisednick ident the.host.com * : Username \{ I am \$cool\]" :] 1 end] :
Tcl: Username { I am $cool]
Code: Select all
ytfwtj ~zfmq@hots.domain * yohxrtru
Code: Select all
if {[string equal "~" [string index [lindex [split $uhost @] 0] 0]]} {
Code: Select all
~zfmq
Code: Select all
yohxrtru
Code: Select all
bind join - * lookup:realname
proc lookup:realname {nick uhost hand chan} {
puthelp "WHOIS $nick"
}
bind raw - 311 parse:realname
proc parse:realname {from key arg} {
set nick [lindex [split $arg] 1]
set ident [lindex [split $arg] 2]
set host [lindex [split $arg] 3]
set realname [string trimleft [lrange $arg 5 end] :]
if {[string first " " $realname]==0} {
# the first char in realname is a space
}
}
Code: Select all
on 1:join:#chan: { whois $nick }
raw 311:*:if ($len($gettok($rawmsg,8,32)) == 1) { .kick #chan $2 }
Actually there's no space, that's the mIRC script formatting I believe.Reynaldo wrote:ytfwtj ~zfmq@hots.domain_*_yohxrtru <-- anormal user only 1 space "_"
Code: Select all
set realname [string range [lrange $arg 4 end] 1 end]
Code: Select all
if {[string equal " " [string range $arg [expr [lindex $arg 3]-2] [expr [lindex $arg 3]-1]]]} {
if {[string equal " " [string range $arg [expr [lindex $arg 2]+1] [expr [lindex $arg 2]+2]]]} {