mIRC Home    About    Download    Register    News    Help

Print Thread
#244193 01/02/14 12:41 PM
Joined: Jun 2013
Posts: 9
K
Kyance Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Jun 2013
Posts: 9
So, i created an !t(emp)ban command, but it doesn't seem to work.
It gets stuck at the Syntax etc. (How to use)

Code:
oon *:leave:#: {
  if (%banned == 1)
  {
    msg $chan $nick has left the channel while being banned!
    timerunban off
  }
}
on *:join:#: {
  set %banned $+ $nick 0
}

on *:text:!tban:#: {
  if($me == isop)
  {
    if($2 == $null || $3 == $null || $4- == $null)
    {
      notice $nick [USAGE] - !tban NICK TIME REASON -- Example -- !tban azaza 50 Spam | halt
    }
    elseif($2 == $nick)
    {
      notice $nick [NOTE] - Are you really trying to ban yourself? | halt
    }
    else
    {
      msg $chan 5[BAN] 7-3 $nick 4has banned7 $2 4for:5 $4-! ( TIME: $3 )
      set %banned $+ $nick 1
      mode $chan +b $2
      timerunban 1 $3
      {
        mode $chan -b $2
        set %banned $+ $nick 0
        msg $chan 5[BAN] 7-3 $nick 4has been un-banned! (TIME EXPIRED)
        notice $2 You're unbanned.
      }
    }
  }
}


Last edited by Kyance; 01/02/14 12:46 PM.
Joined: Jan 2014
Posts: 55
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2014
Posts: 55
Would something like this help?

Use !tban nickname time reason

Must be opped in the room to use the command, Place in remotes (this is to work in a bot mIRC not your own) let me know if you are adding it to your own mIRC client and I will make it work for you

Code:
on *:TEXT:*:#: { 
  if ($strip($1) == !tban) {
    if ($nick !isop $chan) { .notice $nick Sorry but you must be opped to use this command! | halt }
    if ($2 == $null) && ($3 == $null) && ($4- == $null) { .notice $nick [USAGE] - !tban NICK TIME REASON -- Example -- !tban azaza 50 Spam | halt }
    if ($2 == $me) { .notice $nick [NOTE] - I will not ban myself! | halt } 
    if ($2 == $nick) { .notice $nick [NOTE] - Are you really trying to ban yourself? | halt }
    if ($2 !ison $chan) { .notice $nick [NOTE] Sorry but $2 is not in $chan | halt }
    else {
      .msg $chan 5[BAN] 7-3 $nick 4has banned7 $2 4for:5 $4-! ( TIME: $3 )
      .ban -ku $+ $3 $chan $2 
    }
  }
}



Edited: The version you posted only set +b (ban) I have made my version to +b (ban) and then kick the user from the room.

Last edited by jaystew; 01/02/14 05:37 PM.

Regards

JayStew
Joined: Jun 2013
Posts: 9
K
Kyance Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Jun 2013
Posts: 9
Originally Posted By: jaystew
Would something like this help?

Use !tban nickname time reason

Must be opped in the room to use the command, Place in remotes (this is to work in a bot mIRC not your own) let me know if you are adding it to your own mIRC client and I will make it work for you

Code:
on *:TEXT:*:#: { 
  if ($strip($1) == !tban) {
    if ($nick !isop $chan) { .notice $nick Sorry but you must be opped to use this command! | halt }
    if ($2 == $null) && ($3 == $null) && ($4- == $null) { .notice $nick [USAGE] - !tban NICK TIME REASON -- Example -- !tban azaza 50 Spam | halt }
    if ($2 == $me) { .notice $nick [NOTE] - I will not ban myself! | halt } 
    if ($2 == $nick) { .notice $nick [NOTE] - Are you really trying to ban yourself? | halt }
    if ($2 !ison $chan) { .notice $nick [NOTE] Sorry but $2 is not in $chan | halt }
    else {
      .msg $chan 5[BAN] 7-3 $nick 4has banned7 $2 4for:5 $4-! ( TIME: $3 )
      .ban -ku $+ $3 $chan $2 
    }
  }
}



Edited: The version you posted only set +b (ban) I have made my version to +b (ban) and then kick the user from the room.


Never-mind, tested it.

Thank you so much! laugh

Last edited by Kyance; 01/02/14 06:45 PM.

Link Copied to Clipboard