mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2011
Posts: 2
T
TTSDA Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
T
Joined: Feb 2011
Posts: 2
So, I have a minecraft server and I want to make a NotifyBot to my Channel.
I made this chart to explain it:
http://www.lucidchart.com/publicSegments/view/4d4b12c0-5bfc-4ee9-aafd-215f0ac17605
How do I do it ?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What you are showing is a simple on TEXT. However, for your status check, that will only work if the user is online unless you're storing that somewhere. Without knowing how you are planning on handling that for offline users, I can't put anything to handle status for offline nicks. This will say the nick is offline regardless of their op status. Maybe that's okay for what you need?

Code:
on *:text:!*:#: {
  var %admin = $remove($1,!)
  if ($nick($chan,%admin,vr) || $nick($chan,%admin $+ |AFK,vr)) { return }
  if (%admin ison $chan) {
    if (!$2) { msg $chan You did not include a message to send. | return }
    msg %admin $2-
    msg $chan %admin was notified!
  }
  elseif (%admin $+ |AFK ison $chan) { msg $chan %admin is AFK }
  else { msg $chan %admin is offline }
}


Be aware that the script has no idea if someone is typing !nick or !command. For example, if someone tries to type !help, the script will respond that help is offline. If you *do* store op status somewhere, then it won't respond to invalid nicks.

Also, this doesn't check for duplicate nicks. For example, if one nick is MyNick and another user's nick is MyNick|AFK. It won't verify to see which nick is the correct one. Normally, that shouldn't be a problem, but it's something to be aware of if you have people who like to be idiots in your channel.

Last edited by Riamus2; 03/02/11 09:25 PM.

Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2011
Posts: 2
T
TTSDA Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
T
Joined: Feb 2011
Posts: 2
Originally Posted By: Riamus2
What you are showing is a simple on TEXT. However, for your status check, that will only work if the user is online unless you're storing that somewhere. Without knowing how you are planning on handling that for offline users, I can't put anything to handle status for offline nicks. This will say the nick is offline regardless of their op status. Maybe that's okay for what you need?

Code:
on *:text:!*:#: {
  var %admin = $remove($1,!)
  if ($nick($chan,%admin,vr) || $nick($chan,%admin $+ |AFK,vr)) { return }
  if (%admin ison $chan) {
    if (!$2) { msg $chan You did not include a message to send. | return }
    msg %admin $2-
    msg $chan %admin was notified!
  }
  elseif (%admin $+ |AFK ison $chan) { msg $chan %admin is AFK }
  else { msg $chan %admin is offline }
}


Be aware that the script has no idea if someone is typing !nick or !command. For example, if someone tries to type !help, the script will respond that help is offline. If you *do* store op status somewhere, then it won't respond to invalid nicks.

Also, this doesn't check for duplicate nicks. For example, if one nick is MyNick and another user's nick is MyNick|AFK. It won't verify to see which nick is the correct one. Normally, that shouldn't be a problem, but it's something to be aware of if you have people who like to be idiots in your channel.

Ok, so, I want to store a nick list somewhere, how can I do it ?
EDIT: Oh, I have a bot in the channel that connects with the game, the messages are like "<@Bot> ([Mod] Player) message..." I need the !Player to work with the messages. I need to store the nicknames for that somehow. right ?

Last edited by TTSDA; 03/02/11 09:44 PM.

Link Copied to Clipboard