User Control Panel
Advertisements

HELP US, HELP YOU!

Uh, exclude the !command from $msg

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl
View unanswered posts
Author Message
X-Worm
Newbie
Newbie


Joined: 12 May 2005
Posts: 36

Reputation: 35.7Reputation: 35.7Reputation: 35.7Reputation: 35.7

PostPosted: Wed Jun 08, 2005 5:31 am    Post subject: Reply with quote

Quote:
$msg =~ s/you/j00/ig;
$msg =~ s/cker/x0r/ig;
$msg =~ s/cks/x/ig;
$msg =~ s/ter/tar/ig;
$msg =~ s/!/!1/sig;
$msg =~ s/a/4/sig;
$msg =~ s/e/3/sig;
$msg =~ s/i/!/sig;
$msg =~ s/l/1/sig;
$msg =~ s/o/0/sig;
$msg =~ s/s/5/sig;
$msg =~ s/t/7/sig;
$msg =~ s/c/k/sig;

&send($self, $msg, $username);

I'm using that to turn text into "leet" text, but when I type "!leet test text" it goes "!1337 7357 73x7", and I don't want the command thingy to be there...
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Wed Jun 08, 2005 7:57 am    Post subject: Reply with quote

I don't understand how you were able to do all of that regular expression code and not know how to replace a command with nothing. But I'll give it to you anyhow:

Code:
$msg =~ s/^\!leet\s+//;
Back to top
X-Worm
Newbie
Newbie


Joined: 12 May 2005
Posts: 36

Reputation: 35.7Reputation: 35.7Reputation: 35.7Reputation: 35.7

PostPosted: Wed Jun 08, 2005 1:16 pm    Post subject: Reply with quote

QUOTE(Mojave @ Jun 7 2005, 11:57 PM)
I don't understand how you were able to do all of that regular expression code and not know how to replace a command with nothing. But I'll give it to you anyhow:

Code:
$msg =~ s/^\!leet\s+//;

[right][snapback]48603[/snapback][/right]


lol. Thanks. Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group