mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2006
Posts: 2
K
Kaemon Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
K
Joined: Jan 2006
Posts: 2
Code:
on 1:JOIN:#Screwthischat: {
  if(%autoop == on) { goto auto }
  if(%autoop == off) { goto end }
  :auto
  if($nick == Kdogground2) { goto giveop }
  else { goto finish }
  :giveop
  /chanserv op #screwthischat $nick
  :finish
}  


Now, Im not good with codes, and Im sure this is a big mess, but what I need it to do, is so I can assing it to a name (kdogground2 there is a example) ops when the enter the channel, without being on the access.

Last edited by Kaemon; 03/01/06 05:52 PM.
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
try this version of your
Code:
on *:JOIN:#Screwthischat: {

  if(%autoop == on) { 

  if($nick == Kdogground2) { chanserv op #screwthischat Kdogground2 }

}  

removed things you don't need
if something is true { do this }
if it isnt true you dont need/want something unless you need a particular event to happen.
if nick is an op { op }
else {voice }
as an example
$iif($nick isop $chan, greets op,greets user)

on *:JOIN:#Screwthischat: {
if ($nick == Kdogground2) {
$iif(%autoop == on,chanserv op #screwthischat Kdogground2, echo -a autoop is off)
}
}

Joined: Jan 2006
Posts: 2
K
Kaemon Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
K
Joined: Jan 2006
Posts: 2
=o Wow, thanks, that works perfectly, though I do have one more question, is there a way, so, like, a person would have to identify with me in order to be able to access the script?
-Edit-
Becasue I realized, that anyone could jsut change their nick, and gain ops.

Last edited by Kaemon; 03/01/06 07:56 PM.
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I havent tested this
Code:
;single channel
;usage /msg you AUTH <password>
on *:open:?:{
if ($nick == Kdogground2) && (Kdogground2 ison #Screwthischat) && (Kdogground2 !isop #Screwthischat) && (auth iswm $$1) && ($2 iswm thepassword) {
chanserv op #screwthischat Kdogground2
close Kdogground2
}
}
;multiple channel 
;usage /msg you AUTH #Screwthischat <password>
on *:open:?:{
if ($nick == Kdogground2) && (Kdogground2 !isop #Screwthischat) && (auth iswm $$1) && (#Screwthischat iswm $2)  && ($3 iswm thepassword) {
chanserv op #screwthischat Kdogground2
close Kdogground2
}
}

but I think either should work


Link Copied to Clipboard