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.

problem raw

Old posts that have not been replied to for several years.
Locked
r
ranny
Halfop
Posts: 49
Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland

problem raw

Post by ranny »

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^^
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

it seems that

Code: Select all

putserv "privmsg $chan:$identi($nick)"
should be

Code: Select all

putserv "who $chan:$identi($nick)"
r
ranny
Halfop
Posts: 49
Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland

Post by ranny »

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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)
r
ranny
Halfop
Posts: 49
Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland

Post by ranny »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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?
r
ranny
Halfop
Posts: 49
Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland

Post by ranny »

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
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
r
ranny
Halfop
Posts: 49
Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland

Post by ranny »

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
Locked