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.

Public Channel & User Commands

Support & discussion of released scripts, and announcements of new releases.
Post Reply
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

Public Channel & User Commands

Post by testebr »

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:

Code: Select all

!t some word ;)
Will result:

Code: Select all

some word {;)}
How to I can fix it?

Thanks.
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

In topic procedure change

Code: Select all

set topictext [lrange $text 0 end]
to

Code: Select all

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/
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

Post by testebr »

Amaze!

Work fine, thank you.

I will try to fix more tcls with this idea.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
x
x0x
Op
Posts: 140
Joined: Tue Feb 10, 2009 6:42 am

Post by x0x »

Thank you for the security alert, is there a proper script available somewhere? I only need !op !t !v !k !kb
Post Reply