mIRC Home    About    Download    Register    News    Help

Print Thread
#19746 16/04/03 11:40 PM
Joined: Apr 2003
Posts: 2
R
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Apr 2003
Posts: 2
I have a bot scripted to run on the same computer as I'm on. For commands meant for me only, I run a simple hostmask check to see if the user is me or not. The function is:

;CHECKS TO MAKE SURE IT'S ME
alias isme {
if ($address($1,2) == $address($me,2)) {
return $true
}
return $false
}

The bug comes into play when the bot is disconnected and reconnected to a server (due to a netsplit, manual reconnect, etc.). The bot seems to be no longer to find it's own address. It returns the following:

[19:41:02] -RangerBot- Address mismatch; You aren't my owner!!
[19:41:04] -RangerBot- You: *!*@159.178.254.37
[19:41:06] -RangerBot- Me:

No address. The only solution is to restart mIRC. Is there something I'm doing wrong?

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
When it joins the channel, the user masks are unknown. Try adding this line to your bot, or add to the on join event you have currently...

Code:
on 1:JOIN:#: {
  if ($nick == $me) { /who $chan }
}


That will who the whole channel, activly getting every user's host mask in the channel. >:F


-KingTomato
Joined: Apr 2003
Posts: 2
R
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Apr 2003
Posts: 2
Very execellent. Works perfectly.

Maybe something like that could be implemented into the program in the future? Or might that be too resource intensive or something?

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Increases the chances of you flooding yourself off the server, would make a nice option though..


Link Copied to Clipboard