egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

error mass tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Mon Dec 26, 2005 8:07 pm    Post subject: error mass tcl Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Dec 26, 2005 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Mon Dec 26, 2005 8:51 pm    Post subject: Reply with quote

thx for help!!!! (k)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber