This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Sat Mar 08, 2003 8:21 am
ceasar... read the FAQ.......
You should NOT do list commands on a string. $arg is a string.. llength is a list-command. This means you have to do [llength [split $arg]] to make it correct..
this is basic tcl-coding and you should have understood this by now
.. if not maybe you should take a second look at some of the tcl-tutorials online?
string tolwer is used ... ie when you want to make a match without upper/lowercase difference.
bLa == bla <-- false
[string tolower bLa] == bla <-- true
Elen sila lúmenn' omentielvo
j
jam
Post
by jam » Sat Mar 08, 2003 9:30 am
thanks for everything but for me doesn't work, i get a notice in which there is " Usage: !v nick1 nick2 nick3" but nothing happens on the chan.
i hope you will go on helping me , thank you again
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Sat Mar 08, 2003 9:49 am
hehe of course you do
should be
Code: Select all
if {[llength [split $arg]] == 0} {
Elen sila lúmenn' omentielvo
j
jam
Post
by jam » Sat Mar 08, 2003 10:17 am
sorry but it still doesn't work. i have this message in the party-line
Code: Select all
Tcl error [pub:v]: can't set "botnick": read-only variable
GodOfSuicide
Master
Posts: 463 Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria
Post
by GodOfSuicide » Sat Mar 08, 2003 11:17 am
Code: Select all
set botnick [string tolower $botnick]
would overwrite the global var $botnick with it's lowercase version..
change it to
Code: Select all
set botnick2 [string tolower $botnick]
and replace every following $botnick with $botnick2
i have no running eggie atm, but i think that will work.
j
jam
Post
by jam » Sat Mar 08, 2003 12:46 pm
i don't have a mistake message anymore but it still doesn't work
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sun Mar 09, 2003 2:29 am
Actualy I've said earlyer that there is no need for the 'botnick' thing. Here is the *bug free* version that should work fine:
Code: Select all
bind pub o|o !v pub:v
proc pub:v {nick host handle channel arg} {
if {[llength [split $arg]] == 0} {
putserv "NOTICE $nick :\002Usage:\002 !v <nick1> \[nick2\] \[nick3\] .. etc."
return 0 }
if {![botisop $channel]} {
putserv "NOTICE $nick :I'm not oped in $channel."
return 0 }
foreach user [split $arg] {
if {![onchan $user $channel] || [isop $user $channel] || [isvoice $user $channel]} { continue }
pushmode $channel +v $user
}
}
I'm a bit rusty..
Got to consult again the manual..
Once the game is over, the king and the pawn go back in the same box.
j
jam
Post
by jam » Sun Mar 09, 2003 8:36 am