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 

Help with my old script Trivia 2000 please
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Ian-Highlander
Op


Joined: 24 Sep 2001
Posts: 165
Location: Ely, Cambridgeshire

PostPosted: Tue Apr 04, 2006 10:10 am    Post subject: Reply with quote

Resolved this issue and got it working in the end, thanks for your help Sir_Fz.

One further question someone may be able to answer for me. I've used the "stripcodes" command in this new code and on checking Eggdrop documentation this command was only introduced on Eggdrop 1.6.17. Am I right in thinking this will potentially break my script for early versions of Eggdrop, or will earlier versions just ignore that and carry on?

Or is there an alternative thats coded into all versions of Eggdrop?
_________________
"Insanity Takes Its Toll, Please Have Exact Change"
Back to top
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Apr 04, 2006 10:17 am    Post subject: Reply with quote

You're right, [stripcodes] has been introduced in eggdrop1.6.17 and it will not work on earlier version. If I were you, I wouldn't care about that - users should be using the latest eggdrop anyway. But you can resolve that issue by creating your own proc to strip codes.
Code:
proc stripcodes str {
 regsub -all {\003[0-9]{0,2}(,[0-9]{0,2})?} $str "" str
 set str [string map {"\017" "" "\037" "" "\002" "" "\026" "" "\006" "" "\007" ""} $str]
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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