mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
I was wondering if anyone can help me with this...
I have a write script (pasted below)...i wanna make it exclude a certain chat name..How would I go about doing this.

I want the response to be for this user (we will use me as an example) Sorry techchef, you are not permitted to use this command

Code:
ON *:TEXT:!add*:#: { write list.txt a $2- }

Last edited by Techchef; 19/09/16 11:33 PM.
Joined: Oct 2015
Posts: 112
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2015
Posts: 112
I'm curious if you meant for the letter "a" to append to the current line of the text file. If so, you have it at the wrong spot, it should be right after the word "write." What you want to do is pretty simple if you just want to exclude one user. Ideally, a script like this should have some sort of protection so the same user can't add themselves twice, unless that is how you intend the script to be used. Assuming that the script you provided is how you intended it, you can do the following to exclude one user:

Code:
ON *:TEXT:!add*:#: {
  IF ($nick != banneduser) write list.txt a $2-
  ELSE MSG $chan Sorry, $nick $+ , you are not permitted to use this command.
}


I helped someone with a similar request before, the following may help.

Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
it is meant to be used so multiple people can add stuff...
I will explain what this is...When someone mentions chocolate-my bot will give a chocolate item (this is purely for fun)...I created it so that when someone uses the !add *BLAH* command it will add that to a note.txt and now I have it when chocolate is mentioned its pulling it off note.txt (before I had it set as a "(1,21)" with 21 different options for it to randomly pick.

Now my issue is-One user in particular likes to add disgusting stuff. So I want it to exclude him from this script.

The way i had my script originally worked-but not the line i needed to exclude him. he is not banned-so not sure if banneduser will work...

Joined: Oct 2015
Posts: 112
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2015
Posts: 112
I just used "banneduser" as a placeholder, I should have mentioned to just change that name with the name of the person that you don't want to be able to use the command. XD

Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
Thanks smile


Link Copied to Clipboard