mIRC Home    About    Download    Register    News    Help

Topic Options
#252278 - 01/04/15 08:02 AM replace space with +
Blood_Wolf89 Offline
Pikka bird

Registered: 24/03/15
Posts: 19
I am making a script for when people are too lazy to look something up a mod can type !google and what ever the question is and the output would link them a funny google page.

Example: !google mirc replace space with plus

Output: http://lmgtfy.com/?q=mirc+replace+space+with+plus

Here is my code:
Code:
on *:TEXT:!google *:#: { msg # Let me google that for you... http://lmgtfy.com/?q= $+ $replace($2-,  , +)  }

Top
#252279 - 01/04/15 08:12 AM Re: replace space with + [Re: Blood_Wolf89]
Nillen Offline
Hoopy frood

Registered: 24/12/13
Posts: 779
Loc: Sweden
$chr(32) refers to space. You can check out these over at http://www.asciitable.com/
_________________________
Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Top
#252361 - 06/04/15 12:13 AM Re: replace space with + [Re: Blood_Wolf89]
Keydosed Offline
Self-satisified door

Registered: 05/04/15
Posts: 3
Code:
on *:TEXT:!google *:#: { 
  msg # Let me google that for you... http://lmgtfy.com/?q= $+     $replace($2-, $chr(32), +)
}

Top