| View previous topic :: View next topic |
| Author |
Message |
testebr Halfop
Joined: 01 Dec 2005 Posts: 86
|
Posted: Mon Jun 15, 2009 10:00 pm Post subject: Public Channel & User Commands |
|
|
Dear friends,
I'm using this TCL (search link) by several months, work great for my needs. But I have a small problem with command !t <topic>
If you sent:
Will result:
How to I can fix it?
Thanks. |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Mon Jun 15, 2009 11:07 pm Post subject: |
|
|
In topic procedure change | Code: | | set topictext [lrange $text 0 end] | to | Code: | | set topictext [join [lrange [split $text] 0 end]] |
The $text argument is a string but lrange command works only with lists. So we need to split text before using lrange. But later we need to turn our text in string back, thats why we use join. _________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
testebr Halfop
Joined: 01 Dec 2005 Posts: 86
|
Posted: Tue Jun 16, 2009 7:35 am Post subject: |
|
|
Amaze!
Work fine, thank you.
I will try to fix more tcls with this idea. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Jun 16, 2009 12:33 pm Post subject: |
|
|
You'll actually find this kind of improper list-use all through the script. Also, in this special case, you could simply use $text directly, rather than converting it to a list, selecting the whole list, and then convert it back into a string.
You should also be aware, that the mass-(de)voice/op commands are flawed as they expect the server to accept 6 modes per line (3 is standard) without checking how many the server actually permits.
Further, this script uses a very insecure security model, which grants public access to the chanset tcl command through mere hostmask matching. This opens for the possibility of remote code vulnerability using the need-* channel settings. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
x0x Op
Joined: 10 Feb 2009 Posts: 140
|
Posted: Mon Mar 22, 2010 5:41 pm Post subject: |
|
|
| Thank you for the security alert, is there a proper script available somewhere? I only need !op !t !v !k !kb |
|
| Back to top |
|
 |
|