egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Public Channel & User Commands

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Mon Jun 15, 2009 10:00 pm    Post subject: Public Channel & User Commands Reply with quote

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:
!t some word ;)


Will result:

Code:
some word {;)}


How to I can fix it?

Thanks.
Back to top
View user's profile Send private message
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Mon Jun 15, 2009 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Tue Jun 16, 2009 7:35 am    Post subject: Reply with quote

Amaze!

Work fine, thank you.

I will try to fix more tcls with this idea.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Jun 16, 2009 12:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
x0x
Op


Joined: 10 Feb 2009
Posts: 140

PostPosted: Mon Mar 22, 2010 5:41 pm    Post subject: Reply with quote

Thank you for the security alert, is there a proper script available somewhere? I only need !op !t !v !k !kb
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber