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.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Fri Oct 01, 2004 2:52 pm
Code: Select all
## Binds
bind raw - 311 Public:whois
bind raw - 319 Public:whois
bind raw - 312 Public:whois
bind raw - 330 Public:whois
bind raw - 318 Public:whois
bind pub o|o !whois Public:whois
## Procs
proc Public:whois {nick uhost hand chan text} {
set person [lindex [split $text] 0]
putserv "PRIVMSG $chan :4»» Whoise $person ..."
putserv "WHOIS $person"
if {[string match -nocase "*No such nickname*" $text]} {
putserv "PRIVMSG $chan :4»» Unbekannte Person."
return
}
if {[string match -nocase "*Whois*" $text]} {
putserv "PRIVMSG $chan :4»» Whois: [lindex [split $text] 0] [lindex [split $text] 1] [lindex [split $text] 2]"
return
}
if {[string match -nocase "*Server*" $text]} {
putserv "PRIVMSG $chan :4»» Server: [lindex [split $text] 0]"
return
}
if {[string match -nocase "*is authed as" $text]} {
putserv "PRIVMSG $chan :4»» $person is authed as [lindex [split $text] 0]."
return 0
}
}
I get the errormessages:
Code: Select all
[20:53:27] <Q13> [20:53] Tcl error [Public:whois]: wrong # args: should be "Public:whois nick uhost hand chan text"
[20:53:27] <Q13> [20:53] Tcl error [Public:whois]: wrong # args: should be "Public:whois nick uhost hand chan text"
[20:53:27] <Q13> [20:53] Tcl error [Public:whois]: wrong # args: should be "Public:whois nick uhost hand chan text"
[20:53:27] <Q13> [20:53] Tcl error [Public:whois]: wrong # args: should be "Public:whois nick uhost hand chan text"
[20:53:27] <Q13> [20:53] Tcl error [Public:whois]: wrong # args: should be "Public:whois nick uhost hand chan text"
I don't understand how to fix it though
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Fri Oct 01, 2004 3:14 pm
Read the docs... (bind raw doesn't need the same args as pub does....)
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Sat Oct 02, 2004 8:06 am
Blah.
It should be:
Code: Select all
bind pub n "!whois" my:proc
proc myproc {nick uhost hand chan text} {
putserv "WHOIS [lindex $text 0]"
return 0
}
Then bind raw's will automatically trigger your main proc, the long one which you showed! Use arguments {from keyword arg}.
Note: Do not 'return 0'. For all procs binding to "RAW" use 'return 1' that is better.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sun Oct 03, 2004 7:03 am
Well i didnt write it
Someone else did and he asked me to fix it and seeing as i didnt know how, i asked here
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sun Oct 03, 2004 8:42 am
I belive it should be "my:proc" not "myproc" and don't add "return 0" just to be there just in case like you usualy do with the "global botnick"
Once the game is over, the king and the pawn go back in the same box.
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Sun Oct 03, 2004 12:48 pm
Yeah well that was a typing error, I guess he has some common sense to understand that. Well to halt it, I would recommend you use the return command.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================