I've started a script , but i'm still a complete n00b in tcl scripting and i don't know how to get one one word from one linked phrase.
script usage:
!add <game-Version> <url> <type>
(someone) !add game-V69 <URL> <Type>
(someone) !find game-V69
(bot) [<Type>] Current version of game is V69 , you can find it at <URL>.
i just need to know how i can "extract" the <version>. cuz all the remaining is done.
The <version> identifier can be one of diverse types of identificators like V1 , GOD , whatever, but it is always in the end , separated for one "-" from the game.name
EDIT: Already Solved the problem using split and lrange, easy :x .
-> I guess i can use this topic for one other problem , tcl has any kind of command to do the same as $strip(mIRC scripting) ?
i need that coz i'm using
bind pub - !find
and if !find is in bold , underlined or colored the bot doesn't do the search.
someone can help me with that ?
tnks in advance.
EDIT: Solved m8's , tks.
Last edited by w00f on Mon Nov 06, 2006 8:58 am, edited 2 times in total.
stripcodes <strip-flags> <string>
Description: strips specified control characters from the string given.
strip-flags can be any combination of the following:
b - remove all boldface codes
c - remove all color codes
r - remove all reverse video codes
u - remove all underline codes
a - remove all ANSI codes
g - remove all ctrl-g (bell) codes
Returns: the stripped string.
Module: core
I did read it, that's why I showed the poster the equivalent command for stripping codes.. But, if criticising me elicits a better answer, that's fine by me