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.
ranny
Halfop
Posts: 49 Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland
Post
by ranny » Wed Jun 22, 2005 2:09 pm
hello,
i have this little script
Code: Select all
bind raw - 311 parse:realname
proc parse:realname {from key arg} {
global hosti identi realname
set nick [lindex [split $arg] 1]
set identi($nick) [lindex [split $arg] 2]
set hosti($nick) [lindex [split $arg] 3]
set realname($nick) [string trimleft [lrange $arg 5 end] :]
set open [open $maliste a+]
puts $open "$identi($nick)"
close $open
return 0
}
bind pub - !who effacexempt
proc effacexempt {nick host hand chan arg} {
global hosti identi realname
putserv "privmsg $chan:$identi($nick)"
}
but it's not good? Is not possible?
Thanks for yours answers.
Sorry for my very good english^^
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Jun 22, 2005 3:31 pm
it seems that
Code: Select all
putserv "privmsg $chan:$identi($nick)"
should be
Code: Select all
putserv "who $chan:$identi($nick)"
ranny
Halfop
Posts: 49 Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland
Post
by ranny » Wed Jun 22, 2005 4:03 pm
No, that does not function.
error message : [21:58] Tcl error [realname]: can't set "realname(liloto)": variable isn't array .
I don't know if this script is possible. If one among you has an idea?
thanks.
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Jun 22, 2005 4:12 pm
it is possible if you know some basic Tcl scripting and know what you want
you seem to know neither (at least try to describe what you need)
ranny
Halfop
Posts: 49 Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland
Post
by ranny » Wed Jun 22, 2005 4:41 pm
hello,
yes I know what I want. My bind raw allows me recuperer ident , realname of a person who joined the channel. After with the bind pub I want to transmit this information on the chan.
But I do not manage to send the variable of the bind raw in the bind pub. It's my problem.
ciao
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Jun 22, 2005 9:13 pm
you want the realname of every user who joins the channel?
elaborate on "I want to transmit this information on the chan" - transmit exactly what and for what purpose?
ranny
Halfop
Posts: 49 Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland
Post
by ranny » Thu Jun 23, 2005 4:19 am
hello,
I recover the realname, ident , the host,of every user who joins the channel(with the bind raw).And with " !who nick ", I want that information appear on the channel.
if somebody has an idea??
Thanks
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Thu Jun 23, 2005 4:48 am
set realname($nick) [string trimleft [lrange $arg 5 end] :]
I wouldn't use that, I would use:
set realname($nick) [join [lrange [split $arg :] 1 end] :]
I believe this is absolut false proof. btw string trim only removes trailing or leading characters from a string, not from list elements!
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...
ranny
Halfop
Posts: 49 Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland
Post
by ranny » Thu Jun 23, 2005 8:06 am
hello,
No, with
Code: Select all
set realname($nick) [join [lrange [split $arg :] 1 end] :]
that gives the same error message ==>can't set "realname(liloto)": variable isn't array .
That should not be possible with this method? Can be in another way?
thanks
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jun 23, 2005 9:41 am
Maybe realname is being used as a variable in another script, so you can't use it as an array. Try to use a different name than realname.
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Thu Jun 23, 2005 2:31 pm
sorry my bad, I thought this error was so obvious that I already forgot about it again ^-^.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...