mIRC Home    About    Download    Register    News    Help

Topic Options
#246268 - 01/06/14 04:22 AM Setting up my bot to do multiple channels
judge2020 Offline
Fjord artisan

Registered: 21/03/14
Posts: 215
Loc: USA
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!
}
_________________________
#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball

Top
#246270 - 01/06/14 04:42 AM Re: Setting up my bot to do multiple channels [Re: judge2020]
blessing Offline
Vogon poet

Registered: 03/04/14
Posts: 191
//echo $chr(35)

you can use $chr(35) $+ $nick

Top
#246318 - 03/06/14 07:07 PM Re: Setting up my bot to do multiple channels [Re: blessing]
r4z0r Offline
Nutrimatic drinks dispenser

Registered: 22/12/13
Posts: 9
Just tested it. Works this way! wink

Code:
on *:text:!join:#: {
  msg # Paintballbot joining $nick $+ 's chat..
  .join $chr(35) $+ $nick
}

Top
#246338 - 04/06/14 03:35 PM Re: Setting up my bot to do multiple channels [Re: r4z0r]
judge2020 Offline
Fjord artisan

Registered: 21/03/14
Posts: 215
Loc: USA
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!
}
_________________________
#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball

Top
#246339 - 04/06/14 04:31 PM Re: Setting up my bot to do multiple channels [Re: judge2020]
Bramzee Offline
Vogon poet

Registered: 22/04/14
Posts: 170
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!
}

Top
#246521 - 15/06/14 10:18 PM Re: Setting up my bot to do multiple channels [Re: judge2020]
r4z0r Offline
Nutrimatic drinks dispenser

Registered: 22/12/13
Posts: 9
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
}

Top