mIRC Home    About    Download    Register    News    Help

Print Thread
need help with op script #136951 06/12/05 02:50 AM
Joined: Dec 2005
Posts: 22
S
spirit_cro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2005
Posts: 22
Hi i made a script so that you must be in the channel #plounge and also your name must have [p] in it to get ops. you must have both not one or the other to get ops.

example: name [p]spirit is on #plounge = get ops
name: random on #plounge = no ops

but i also want to make it so they can have [p] anywhere in their nickname like s[p]irit for example.

and 1 more thing some of them just use [p] to get ops so i want to make it if they do that then change their nickname to something else it deops them.

here is my script.

on *:JOIN:#:{
if ((*[p]* iswm $nick) && ($nick ison #plounge) && ($me isop $chan)) { mode $chan +o $nick }

any help appreciated. thanks

Re: need help with op script #136952 06/12/05 02:55 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on @*:JOIN:#:{
   if (*[p]* iswm $nick) && ($nick ison #plounge) { mode $chan +o $nick }
}


-Andy

Re: need help with op script #136953 06/12/05 03:20 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on @*:JOIN:#:{
   if (*[p]* iswm $nick) && ($nick ison #plounge) { mode $chan +o $nick }
}
on @*:nick:{
if (*[p]* !iswm $newnick) {
var %a = $comchan($nick,0)
while %a {
if ($newnick isop $comchan($nick,%a)) { .mode $comchan($nick,%a) -o $newnick }
dec %a
}
}
}

 

Re: need help with op script #136954 06/12/05 05:24 PM
Joined: Oct 2005
Posts: 54
B
benjy355 Offline
Babel fish
Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
on *:join:#: {
if ($chan == #plounge) {
if ($mid($nick,1,3) == [p]) {
mode $chan +o $nick
}
}
}[/code]
I used if $mid instead of iswm so that if somebody is omg[p]rocks, they won't be oped.


Chat NSN
My Server: sleepystickman.ircxpro.com
Re: need help with op script #136955 06/12/05 06:34 PM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Quote:
on *:join:#: {
if ($chan == #plounge) {
if ($mid($nick,1,3) == [p]) {
mode $chan +o $nick
}
}
}[/code]
I used if $mid instead of iswm so that if somebody is omg[p]rocks, they won't be oped.


The original poster mentioned it was acceptable for [p] to be anywhere in the nickname.

Re: need help with op script #136956 06/12/05 06:50 PM
Joined: Oct 2005
Posts: 54
B
benjy355 Offline
Babel fish
Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
doh! shocked

Anyways I wouldn't suggest making it for anyone with [p] in their name, because if someone were to just add it in... Chaos!
I would suggest using a small hash table, or an INI file of sorts.
For keeping a list of people smile

[EDIT]
Code:
alias get.op { return $iif($readini(operlist.ini,users,$1), is on, isn't on) the oper list }
alias addop { 
writeini operlist.ini users $1 true 
if ($1 ison #plounge) { mode #plounge o $1 }
}
alias remop { 
remini operlist.ini users $1 
if (41 ison #plounge) { mode #plounge -o $1 }
}
menu nicklist {
Oper List
.$nick is $get.op($1)
.Add to list : addop $$1
.Remove from list : remop $$1
}
}
on *:join:#: {
if ($chan == #plounge) && ($get.op($1) == is on the oper list) {
mode $chan +o $nick
}
}


I don't have time or the program to check this to see if it works or not right now, I'm at school... mad
-Enjoy


Chat NSN
My Server: sleepystickman.ircxpro.com