mIRC Home    About    Download    Register    News    Help

Topic Options
#142221 - 16/02/06 11:48 PM How can I stop both of my nicks from answering...
FireDivine Offline
Ameglian cow

Registered: 13/02/06
Posts: 47
to a remote code?

My main chatting id is: FireDivine, my bot is FDBot.

I am trying to make it so that if someone typed cookie:

on *:TEXT:cookie:#:{
/describe $chan *Gives you a cookie*
}

Only FDBot would respond and not both FDBot and FireDivine.

Any ideas?

Top
#142222 - 17/02/06 12:18 AM Re: How can I stop both of my nicks from answering...
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
The simplest method is to run the bot using a sepearte instance of mirc, that only it has the scripts of the bot in.

if u must run both users using the same mirc you well need to code in whcih nick is ment to respond to the command
Code:
on *:TEXT:cookie:#:{
  if ($me == FDBot) {
    describe $chan *Gives you a cookie*
  }
}



***

if yoiu are going to do that may i suggest this, you have located in one remote script a alias called BOTNAME as follows
Code:
alias botname return FDBot


then any commands only the bot should function can have this...
Code:
on *:TEXT:cookie:#:{
  if ($me == $botname) {
    describe $chan *Gives you a cookie*
  }
}


This well allow you to change the name of the bot (if u wished to) in one place, and that well effect all scripts for the bot only.

Top
#142223 - 18/02/06 02:08 AM Re: How can I stop both of my nicks from answering
FireDivine Offline
Ameglian cow

Registered: 13/02/06
Posts: 47
Thanks, that worked.

Top