| View previous topic :: View next topic |
| Author |
Message |
TC^^ Voice

Joined: 05 Jul 2005 Posts: 22
|
Posted: Fri Apr 21, 2006 10:52 am Post subject: Using $'s inside { } |
|
|
| Code: | | channel add #onechannel { need-unban { banmail $chan } } |
This adds following info for #onechannel
| Code: |
If I'm banned (need-unban) :
banmail $chan |
Why doesn't it add "#onechannel" instead of $chan ?? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Apr 21, 2006 11:33 am Post subject: |
|
|
Because $chan doesn't exist. Use #onechannel instead, there's no need for a variable here anyway. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
TC^^ Voice

Joined: 05 Jul 2005 Posts: 22
|
Posted: Fri Apr 21, 2006 11:58 am Post subject: |
|
|
Actually there is..
| Code: | bind msg o|o add msg:add
proc msg:add { nick uhost hand args } {
set chan [lindex $args 0]
if {$chan == "#" || $chan == ""} {putquick "PRIVMSG $nick :Fejl! Skriv kanalnavn rigtigt" ; return 0}
if {![string match "#*" $chan]} {set chan "#$chan"}
if {[validchan $chan]} {putquick "PRIVMSG $nick :Jeg er allerede p\345 $chan" ; return 0}
channel add $chan { need-unban { banmail $chan } }
putquick "PRIVMSG $nick :\002$chan\002 added!"
putquick "PRIVMSG #... :$nick added \002$chan\002 to my channel list"
} |
[Edit] Sorry for not posting the entire code, can see how that could be confusing [/Edit] |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Apr 21, 2006 1:40 pm Post subject: |
|
|
try
| Code: | | channel add $chan [list need-unban "banmail $chan"] |
_________________ 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... |
|
| Back to top |
|
 |
TC^^ Voice

Joined: 05 Jul 2005 Posts: 22
|
Posted: Sat Apr 22, 2006 2:41 am Post subject: |
|
|
| That did the trick.. thanks alot |
|
| Back to top |
|
 |
|