| View previous topic :: View next topic |
| Author |
Message |
pilouuu Halfop
Joined: 26 Dec 2005 Posts: 82
|
Posted: Mon Dec 26, 2005 8:07 pm Post subject: error mass tcl |
|
|
Hi :)
Script:
| Code: |
##########################################################################
# mass.tcl by ShakE <shake@abv.bg> #
##########################################################################
# Dobavq na bota funkcii ot roda: !mass <deop/op/voice/devoice> #
##########################################################################
# Ako imate nqkakvi vaprosi, predlojenia ili kritiki posetete foruma na #
# http://shake.hit.bg i pi6ete tam! #
##########################################################################
###################### Ottuk nadolu ne butaite nishto! ###################
bind pub n !mass pub_mass
proc pub_mass {nick uhost hand chan txt} {
global botnick
set $opc_cmd [lindex $txt 0]
if {$opc_cmd == deop} {
putserv "notice $nick :Making mass deop in $chan..."
foreach muser [chanlist $chan] {
if {$muser != $botnick || ![matchattr $muser b] || [isop $muser $chan]} {
}
}
}
if {$opc_cmd == op} {
putserv "notice $nick :Making mass op in $chan..."
foreach muser [chanlist $chan] {
if {$muser != $botnick || ![matchattr $muser b] || ![isop $muser $chan]} {
putserv "mode $chan +o $muser"
}
}
}
if {$opc_cmd == voice} {
putserv "notice $nick :Making mass voice in $chan..."
foreach muser [chanlist $chan] {
if {$muser != $botnick || ![matchattr $muser b] || ![isvoice $muser $chan]} {
putserv "mode $chan +v $muser"
}
}
}
if {$opc_cmd == devoice} {
putserv "notice $nick :Making mass devoice in $chan..."
foreach muser [chanlist $chan] {
if {$muser != $botnick || ![matchattr $muser b] || ![isvoice $muser $chan]} {
putserv "mode $chan -v $muser"
}
}
}
if {$opc_cmd == ""} {
putserv "notice $nick :Syntax error: !mass <op/deop/voice/devoice>"
return 0
}
}
putlog "mass.tcl by ShakE (more tcls at http://shake.hit.bg)"
|
error on command !mass op or deop ...
Tcl error [pub_mass]: syntax error in expression "$opc_cmd == deop": variable references require preceding $
Please help me :) THX for all help |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Dec 26, 2005 8:13 pm Post subject: |
|
|
include comparison strings in quotes, like this:
| Code: |
if {$foo == "bar"} {
...
|
and don't use scripts whose authors didn't even bother to test
needless to say, this particular script should not be used at all, it's too lame for any sane purpose _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
pilouuu Halfop
Joined: 26 Dec 2005 Posts: 82
|
Posted: Mon Dec 26, 2005 8:51 pm Post subject: |
|
|
| thx for help!!!! (k) |
|
| Back to top |
|
 |
|