Hi

The below will now work as room commands !banuser nickname !delban nickname and !addquote quote. Ive also removed it so if you do !banuser nickname it wont message them and tell them. They will only know when they try and add a quote.

Although will this be going into a bot mIRC or are you placing it into your own mIRC - As this will work fine in a bot but if you are planning to place this in your own mIRC then you would not be able to use it as a room commands as the the on text triggers wont be triggered from the same client. If you are going to place into your own mIRC then it would have to be made so you would type /banuser nick name rather than a room command.


Code:
on *:Text:*!banuser*:#: {
  if ($1 == !banuser) && ($nick == NICKNAME) {
    if ($2 == $null) { .notice $nick Command incomplete. Syntax: %c $+ banuser <nick> | halt }
    if ($2 !== $null) {
      if ($2 == $me) { .notice $nick I will not add myself. | halt }
      if ($readini(banned.ini, $2, Level) !== $null) { .notice $nick $2 is already in the quotes ban list. | halt }
      if ($comchan($2,0) == 0) { .notice $nick $2 is not on any of my channels. To add a user you must bring him to a channel were I am too. | halt }
      else { 
        writeini -n banned.ini $2 Level Banned
        writeini -n banned.ini $2 Num 200
        writeini -n banned.ini $2 Hostmask $mask($address($2,2),2)
        .guser 200 $2 2
        .notice $nick You have banned $2 from adding quotes
      }
    }
  }
}
on *:text:*!delban*:#: {
  if ($1 == !delban) && ($nick == NICKNAME) {
    if ($2 == $null) { .notice $nick Command incomplete. Syntax: %c $+ delban <nick>. | halt }
    if ($2 !== $null) {
      if ($2 == $me) { .notice $nick I'm not listed on that list :). | halt }
      if ($readini(banned.ini, $2, Level) == $null) { .notice $nick $2 doesn't appear to be on the ban list. | halt }
      else {
        .ruser 200 $readini(banned.ini, $2, Hostmask)
        .remini banned.ini $2
        .notice $nick  $2 been removed from my quotes ban list.

      }
    }
  }
}
on *:TEXT:!addquote*:#:{ 
  if ($level($mask($address($nick,2),2)) == 200) { .notice $nick Sorry you can not add a quote as you have been banned. }
  else {
  write quotesreview.txt $nick : $2- } { msg $chan Quote added for review }
}



Also it might be worth telling you that this way will also only work if the person is in the same room as the person holding the script. So say if you have it in your bot and your in channel staff and your bot is in channel staff and lobby. if you want to ban someone called jack and do !banuser jack the bot will check channels staff and lobby if that name is in the list it will ban them, if jack isn't in any room with the bot then it wont ban them.

This is because ive asked it to ban the hostmark / address of the username with nick, I can make it so it will ban the person when not in the room but it would only ban the nickname so if I banned nickname jack only then somebody totally different joined the room with the name jack it also wouldn't let them as it would just be going off the nick and not the user host mark.

Last edited by jaystew; 05/01/14 12:25 PM.

Regards

JayStew