|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
Okay, so I want to make a script for my channel. I want the script to do the following:
Whenever a member types in !eplist I want a list of words from a text file to be shown. However, I only want this available for users that are voiced, hopped, opped, etc., meaning that if a user who uses !eplist is not voiced, hopped, etc. then they get a ban for 15 minutes.
If someone could help me make a script for this, I would be very thankful. Thank you.
|
|
|
|
Joined: Mar 2006
Posts: 13
Pikka bird
|
Pikka bird
Joined: Mar 2006
Posts: 13 |
If you looked in the mIRC help, you could easily compose this script.. But since I'm feeling generous and am waiting for some help for myself, I guess I could attempt to make a script for you. I doubt it'd be the most efficient, though. on *:TEXT:!eplist:#:{
if ($nick isop # || $nick isvoice || $nick ishop) {
var %line = 1
while ($read([filenamehere].txt,%line)) {
msg $nick $read([filenamehere].txt,%line)
inc %line 1
}
}
} Note: this is just if I'm understanding you correctly, which I'm not sure I am. Remember to change [filenamehere] to the name of the file.
Last edited by ZorgonX; 25/05/06 10:45 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Here's another suggestion on @*:text:!eplist:#:{
if !$nick($chan,$nick,r) {
.play $nick <filename.txt>
}
else {
.ban -ku900 $chan $nick
}
}
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
I assume that this is the ban code for non voiced, hopped, opped, admin users?
@ ZargonX Thanks for replying. Unfortunately, your code only works for opped users. I used a test account and voiced it, and it didn't work.
Remember that I would like it so that the !eplist works for only voice+ users, not just opped users.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
My script is complete..a check to ensure that the person/bot running the script has ops (which is required for the ban command), a check to ensure that the person sending the request is voiced (or higher), and a 15 minute kick & ban if the person doesn't have the proper access level.
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
@ZargonX The code works now. I had to change something
@RusselB
Here is the code that I used:
on @*:text:!eplist:#:{if !$nick($chan,$nick,r) {.play $nick <eplist.txt>}else {.ban -ku900 $chan $nick}}
When I devoiced my testing account, the ban was not initiated. Maybe I made a mistake when editing it? I am opped in the channel.
Last edited by Sableye2; 25/05/06 11:15 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Ensure that the code isn't all on one line. If the code is all on one line, the way it's coded, it won't work.
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
I didn't put the code on one line. I added it in exactly how you posted it. It still does not work. I even tried to take away the brackets <>'s from eplist.txt but the effect didn't change at all.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
This is how the code should look. This has been tested and does work when everything is set correctly. on @*:text:!eplist:#:{
if !$nick($chan,$nick,r) {
.play $nick eplist.txt
}
else {
.ban -ku900 $chan $nick
}
}
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
Maybe it's not working because I am using an account with the same IP as the owner.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
on @*:text:!eplist:#:{
if !$nick($chan,$nick,r) {
.play $nick eplist.txt
}
else {
.ban -ku900 $chan $nick
}
}
it should look just like that in the REMOTE file. hold the ALT key, type the r key to open the remotes editor add it to your scripts there or make a new file using File then click New
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
The code is copied the exaclty the same in the remotes tab. I have saved it, pressed OK, typed in !eplist with a test account and nothing happens. The message doesn't appear in the PM which is good, but I do not get banned either. I am going to have another person test it out for me. I don't know why this isn't working.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
If you still can't get this working, send me a pm with the server and channel, and I'll come to you to get this working
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
It's working perfectly now. One more thing, can I have it so that a reason is stated when the user is kicked out?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Sure...If you always want the same message, just put it as the LAST thing on the ban command line. If you want to be able to change it, that's a bit more complicated and I'll need to do a bit of research to ensure I get the format correct. (Unless someone else knows how to do it off hand)
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
I just wanted the same message. Thank you, it works perfectly.
|
|
|
|
|