mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2014
Posts: 215
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
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
Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
//echo $chr(35)

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

Joined: Dec 2013
Posts: 9
R
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Dec 2013
Posts: 9
Just tested it. Works this way! wink

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

Joined: Mar 2014
Posts: 215
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
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
Joined: Apr 2014
Posts: 170
Vogon poet
Offline
Vogon poet
Joined: Apr 2014
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!
}

Joined: Dec 2013
Posts: 9
R
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Dec 2013
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
}


Link Copied to Clipboard