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 

stripping generic characters from the hostmask

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
WulfMan72
Voice


Joined: 12 Oct 2005
Posts: 23
Location: Massachusetts

PostPosted: Mon Nov 14, 2005 1:36 pm    Post subject: stripping generic characters from the hostmask Reply with quote

on the network my bot runs on, they automatically add a string of characters to the hostmask of every user. some of the characters are static, and some are dynamic, but it follows the same pattern in every instance.

I'm writing a ban script for the bot and would like to remove all the network added characters and replace them with a wild card.

here's what the addy looks like with the characters in:
@network-hidden-8473F448.blahblah.com

I know how to strip the network-hidden-, but the next set of characters are dynamic. is there a way to remove them using regsub -all or something similiar?

any help would be appreciated
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Nov 15, 2005 4:09 am    Post subject: Reply with quote

Code:

regsub -- {-[0-9A-Z]+?\.} $str {-.} str

_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
WulfMan72
Voice


Joined: 12 Oct 2005
Posts: 23
Location: Massachusetts

PostPosted: Tue Nov 15, 2005 5:46 am    Post subject: Reply with quote

ty ty Very Happy
I really appreciate the reply demond
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 -> Scripting Help 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