mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2011
Posts: 5
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Jul 2011
Posts: 5
There are many bots in one channel, however I just want my bot to catch one line.

When I run my script it looks like this:

<+testbot1> Hello everybody!
<@my_bot> Hello everybody!
<+testbot2> Hello everybody!
<@my_bot> Hello everybody!
<+testbot3> Hello everybody!
<@my_bot> Hello everybody!
<+testbot4> Hello everybody!
<@my_bot> Hello everybody!

I want it to look like this:

<+testbot1> Hello everybody!
<@my_bot> Hello everybody!
<+testbot2> Hello everybody!
<+testbot3> Hello everybody!
<+testbot4> Hello everybody!

Or like this:

<+testbot2> Hello everybody!
<@my_bot> Hello everybody!
<+testbot3> Hello everybody!
<+testbot1> Hello everybody!
<+testbot4> Hello everybody!
<+testbot3> Goodbye user!
<@my_bot> Goodbye user!
<+testbot2> Goodbye user!
<+testbot4> Goodbye user!
<+testbot1> Goodbye user!
<+testbot2> This channel rules!
<@my_bot> This channel rules!
<+testbot3> This channel rules!
<+testbot1> This channel rules!
<+testbot4> This channel rules! x2
<@my_bot> This channel rules! x2
<+testbot1> This channel rules! x2

It should not copy the same line again.

My current script look like this:

Code:
alias setup {
  ; remote network name
  %remotenetwork = EFnet
  ; local network
  %localnetwork = EFnet
  ; remote channel you are taking the information from
  %remotechannel = #test
  ; remote channel password, if it has one
  %remotechannelpassword =
  ; local channel you are echoing the information to
  %localchannel = #test
  ; local channel password, if it has one
  %localchannelpassword =
}

; join chans
on 1:connect: {
  setup
  if ($network == %remotenetwork) {
    join %remotechannel %remotechannelpassword
  }
  elseif ($network == %localnetwork) {
    join %localchannel %localchannelpassword
  }
}

; catch remote bot commands
on 1:text:*:%remotechannel: {
    if (hello isin $1 || goodbye isin $1) {
      ; change to local server
      scid 1
      if ($me ison %localchannel) { 
        msg %localchannel $1-
    }
  }
}

Last edited by temprand0m; 04/08/11 08:57 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Does it all happen at once? If so, just use a basic flood control that will only respond to the message once every X seconds.

Here are a variety of flood control options.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard