mIRC Homepage
Posted By: spermis ban user from using text command - 20/08/07 09:17 PM
How to ban user from using ONTEXT command that is available for all users? I need that it saves banned users on .hsh ot .txt file.
So if i type !ban nick2 it will ban nick2 from using ontext command, and if the ontext command is !add and banned user uses it, it shows - You are banning from using this command, and if user is not banned it do what it should do. Hope you understand.
Posted By: LostShadow Re: ban user from using text command - 20/08/07 09:42 PM
Originally Posted By: spermis
How to ban user from using ONTEXT command that is available for all users?


/help on text

Originally Posted By: spermis
I need that it saves banned users on .hsh ot .txt file.


/help /write

Originally Posted By: spermis
So if i type !ban nick2 it will ban nick2 from using ontext command, and if the ontext command is !add and banned user uses it, it shows - You are banning from using this command, and if user is not banned it do what it should do. Hope you understand.


/help on input
Posted By: LostShadow Re: ban user from using text command - 20/08/07 09:49 PM
Originally Posted By: spermis
How to ban user from using ONTEXT command that is available for all users?


on @*:text:*badword*:#: /echo $chan zomg, $nick said *badword* | /ban $chan $nick 2

Originally Posted By: spermis
I need that it saves banned users on .hsh ot .txt file.


(continued)
| /write bannicks.txt $nick

Quote:
So if i type !ban nick2 it will ban nick2 from using ontext command,


No, use /ban or /b nick for an alias. ! is unnecessary.

Posted By: RusselB Re: ban user from using text command - 20/08/07 11:36 PM
My recommendation is to use User Levels and the ! suffix to restrict who can use the command.
Quote:
The ! suffix

You can prevent commands for a certain event level from being processed by using the ! suffix.

ctcp 5:PING:*:echo PING!

ctcp 5:*:*:!

The ! at the end of the line tells the remote to halt any further processing of level 5 commands.

Posted By: spermis Re: ban user from using text command - 21/08/07 05:35 PM
Originally Posted By: LostShadow
Originally Posted By: spermis
How to ban user from using ONTEXT command that is available for all users?


on @*:text:*badword*:#: /echo $chan zomg, $nick said *badword* | /ban $chan $nick 2

Originally Posted By: spermis
I need that it saves banned users on .hsh ot .txt file.


(continued)
| /write bannicks.txt $nick

Quote:
So if i type !ban nick2 it will ban nick2 from using ontext command,


No, use /ban or /b nick for an alias. ! is unnecessary.


no no.. it is good command, you can use it when you want, but if i want that some user cant use that command i type !ban user and he cant use it.
Posted By: KingTomato Re: ban user from using text command - 21/08/07 07:09 PM
Set your event to 1 user level (e.g. on 1:TEXT:...) if you have them as *, then add a command such as this to limit them:

Code:
on 1:TEXT:!ban &:#: {
  if ($level($nick) != 0) {
    /auser 0 $nick
    /msg $chan $nick has been banned from using text commands.
  }
  else /msg $chan $nick already in ban list.
}
on 1:TEXT:!unban &:#: {
  if ($level($nick) == 0) {
    /ruser $nick
    /msg $chan $nick was removed from the ban list.
  }
  else /msg $chan $nick not in the ban list.
}


They are not stored in a txt or hsh, but in the userlist instead (those with a 0:* are banned). Usage: !ban KingTomato to ban me; likewise, !unban KingTomato to unban me.
Posted By: spermis Re: ban user from using text command - 21/08/07 07:50 PM
oh so 1 means just like *?
Posted By: Horstl Re: ban user from using text command - 21/08/07 08:44 PM
* means: all levels > every user.
1 is the default level (if you did not change this)

As the script will set level "0" for "banned" users, their level is below "1", thus they cannot use the command.
... /help access levels smile
© mIRC Discussion Forums