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.
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Wed Dec 10, 2003 5:51 pm
HI again,
i have a small proc wich add users to a list but if this user is known to the bot he is not added i think i find where the problem is but i dont know how to chanit to include anyuser known or not
heres the proc
Code: Select all
# CODE
# ----
proc dcc:+avertir {hand idx arg} {
set fautif [lindex $arg 0]
global schan
set ok 0
foreach chanlist [array names schan] {
if {[onchan $fautif $schan($chanlist)]} {set ok 1}
}
if {!$ok} {
putdcc $idx "$fautif n'est pas sur le canal"
return 0
}
if {[lindex $arg 1] == ""} {
putdcc $idx "Vous n'avez pas spécifiez de motif"
return 0
}
if {![validuser $fautif] && [finduser [maskhost [getchanhost $fautif] ] ] == "*"} {
adduser $fautif [maskhost [getchanhost $fautif] ]
chattr $fautif +S
setuser $fautif COMMENT [lrange $arg 1 end]
putdcc $idx "Avertissement enregistrer"
return 1
} {
putdcc $idx "Je ne peux mettre cet usager a avertir"
return 0
}
}
the line where i think the problem sits is
Code: Select all
if {![validuser $fautif] && [finduser [maskhost [getchanhost $fautif] ] ] == "*"} {
thanks
Pitchat
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Wed Dec 10, 2003 6:15 pm
tcl-commands.doc:
finduser <nick!user@host>
Description: finds the user record which most closely matches the given
nick!user@host
Code: Select all
if {![validuser $fautif] && ![validuser [finduser $fautif![getchanhost $fautif]]]} {...}
Have you ever read "The Manual"?
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Wed Dec 10, 2003 6:40 pm
Code: Select all
[17:38] Tcl error in file 'config.txt':
[17:38] wrong # args: should be "proc name args
while executing
"proc dcc:+avertir {hand idx arg} {
set fautif [lindex $arg 0]
global schan
set ok 0
foreach chanlist [array names schan] {
if {[onchan $fautif $..."
(file "scripts/avertir2.tcl" line 55)
this is what it returns if i replace my line with yours
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Wed Dec 10, 2003 6:52 pm
Pitchat wrote: [17:38] wrong # args: should be "proc name args
Did you consider removing that closing brace from my example?
Have you ever read "The Manual"?
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Wed Dec 10, 2003 7:02 pm
i consider learning cooking instead of tcl... thanks again