mIRC Home    About    Download    Register    News    Help

Print Thread
#251663 26/02/15 10:01 PM
Joined: Feb 2015
Posts: 1
N
Mostly harmless
OP Offline
Mostly harmless
N
Joined: Feb 2015
Posts: 1
I'm trying to make a script to where it auto joins a race channel (or an event I think it's called) on a text trigger for #speedrunslive for example: "<@RaceBot> Race initiated for The Legend of Zelda: Majora's Mask. Join #srl-w8nqa to participate.", when someone starts a race it can just auto join that channel (srl-w8nqa or whatever it maybe in the case when its generated) not sure where to even start.

Last edited by nimbus458; 26/02/15 10:32 PM.
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Use regular expressions to filter the token you want (the channel) and then /join the $regml(1) match

/help $regex

I can't help you any further since I haven't taken the time to learn regular expressions, but I'm sure other forum users will be able to help.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
This should work

Code:
on *:TEXT:*:#: {
  if ($nick == RaceBot) {
    if ($regex($1-,/#(.*?) to participate$/)) {  
      join $chr(35) $+ $regml(1)
    }
  }
}


Link Copied to Clipboard