mIRC Homepage
Posted By: judge2020 Setting up my bot to do multiple channels - 01/06/14 03:22 AM
I am trying to make my bot have the ability to join multiple channels. I am aving some problems with it:

1. The first thing i want is for someone saying !join in my bot's chat it joins their chat. I have problems with it joining their chat. Here's my script
Code:
on *:text:!join:#mychannel: { /join # $+ $nick | msg #paintballbot joining $nick $+ 's chat }
The thing is the # is treated as my own channel, so if bob says !join it will say /join #mychannelbob, not #bob.

2. I want my bot to basically be a moderation bot for other channels (not !addcom or stuff yet) That includes stuff like the linkblock (looks for a .com(and other domains) and says .timeout). I was wondering if there was a way to make a on:text command that is similar to this?
Code:
on *:text:*.com*:#bob:{
  if ($read(reglist.txt $+ $nick,nw,$nick)) return
  Msg $chan .timeout $nick 1
  Msg $chan Stop posting links!
}
//echo $chr(35)

you can use $chr(35) $+ $nick
Posted By: r4z0r Re: Setting up my bot to do multiple channels - 03/06/14 06:07 PM
Just tested it. Works this way! wink

Code:
on *:text:!join:#: {
  msg # Paintballbot joining $nick $+ 's chat..
  .join $chr(35) $+ $nick
}
thanks both, it worked smile
I still can't find a way for whatever channel it joins to also carry over certain scripts like my linkblock
Code:
on *:text:*.com*:#mark_paintball:{
  if ($nick isop #) return
  Msg #mark_paintball .timeout $nick 1
  Msg #mark_paintball Stop posting links!
}
Code:
on *:text:*.com*:#mark_paintball:{
  if ($nick isop #) return
  Msg #mark_paintball .timeout $nick 1
  Msg #mark_paintball Stop posting links!
}


turn that into this:

Code:
on *:text:*.com*:#:{
  if ($nick isop #) return
  Msg # .timeout $nick 1
  Msg # Stop posting links!
}
Posted By: r4z0r Re: Setting up my bot to do multiple channels - 15/06/14 09:18 PM
Your script/s does/do not work because you specify only one channel "#mark_paintball".

This means that the command/s will only work in that channel.
Use "#" instead of "#mark_paintball" to include all channels that your bot is connected to. smile

eg.

Code:
on *:text:*.com*:#:{
  ; Do stuff
}
© mIRC Discussion Forums