mIRC Home    About    Download    Register    News    Help

Print Thread
#184300 27/08/07 04:13 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
can anyone help me make a script...

im in undernet so we verify our identities by using the command "/msg x verify $nick" so i need a script when a user joins in a channel the script will perform the verification command the x reply will is like this "-X- nick!~ident@ip.address is logged in as username" it a notice... like the code below but i dont know how to make a code for a notice... hope coders understand my english... thankz for the reply...

Code:
On @*:Join:#channel:{
  .msg x verify $nick
}

alias username {
  return username1 username2 username3 username4 username5
}

on 1:NOTICE:*:?: {
  the script here will detect the notice "-X- nick!~ident@ip.address is logged in as username"
    it will detect if the username have a match on the username variable like above
       then it will use a command to OP the user which was verifed
}

sigbin #184302 27/08/07 04:30 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On @*:Join:#channel:{
  .msg x verify $nick
}

alias username {
  return username1 username2 username3 username4 username5
}

on 1:NOTICE:*:?: {
  if (is logged in as username isin $1-) {
    if ($istok($username,$gettok($1,1,33))) mode #channel +o $gettok($1,1,33)
  }
}


I don't use a network with X services so it's untested.

sigbin #184303 27/08/07 04:30 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
; Registered user (UnderNet) logged in
raw 330:*: {
echo -a 10 $2  $+ $4 $5 $6 $7 12 $+ $3
halt
}
the echo is:

nickname is logged in as username (so you could just use $3 to verify logged in)

Last edited by CtrlAltDel; 27/08/07 04:34 PM.

I refuse to engage in a battle of wits with an unarmed person. wink
CtrlAltDel #184368 28/08/07 06:20 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz for the reply.. sorry for my english i guess you both didnt understant what i want... but sladekraven your code was ok but it wont op the virifed user... because the nick should be opped not the username...
Code:
on 1:NOTICE:*:?: {
  if (is logged in as username isin $1-) {
    if ($istok($username,$gettok($1,1,33))) mode #channel +o $gettok($1,1,33)
  }
}

the reply of the of the verification command is like this "sigbinnick!~sigbin@sigbin.users.undernet.org is logged in as sigbin" so the script must use the command on sigbinnick not on sigbin/username alone...

the username database was just the authorized to be opped in that channel



sigbin #184390 28/08/07 11:53 AM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Code:
on *:notice:& is logged in as &:?:{
  if $fulladdress == X!cservice@undernet.org && $istok($username,$6,32) {
     if $me isop #channel { pop 0 $v2 $$ial($1).nick }
  }
}


deegee #184395 28/08/07 01:00 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
still cant op someone... i thing the nick should be carried from the "on:join" script to the "on:notice script".... so the onnotice script can op someone... am can you declare the nick in the onjoin script into a variable then use that variable to the onnotice script?

Code:
On @*:Join:#channel:{
  "declare the nick here as variable"
  .msg x verify $nick
}

alias username {
  return username1 username2 username3 username4 username5
}

on 1:NOTICE:*:?: {
  "retrieve the variable here that contains the nick so this script can op someone"
  if (is logged in as username isin $1-) {
    if ($istok($username,$gettok($1,1,33))) mode #channel +o $gettok($1,1,33)
  }
}

Last edited by sigbin; 28/08/07 01:06 PM.
sigbin #184397 28/08/07 01:15 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Just add something like:

Code:
set -u2 %x.nick $nick


And use:

Code:
mode #channel +o %x.nick


Instead of $gettok($1,1,33).

SladeKraven #184399 28/08/07 01:56 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
still cant op someone....
Code:
On @*:Join:#channel:{
  set -u2 %x.xnick $nick
  .msg x verify $nick
}

alias username {
  return username1 username2 username3
}

on 1:NOTICE:*:?: {
  if (logged in as isin $1-) && ($nick == X) {
    if ($istok($username,$gettok($1,1,33))) mode #channel +o %x.xnick
  }
}

sigbin #184403 28/08/07 02:16 PM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Do you have X in your userlist as a named level? If so "on 1:event:.." will not work.

You are also changing both "#channel" instances to the real channel name?

deegee #184405 28/08/07 02:29 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
userlist? what for? i just need x for the notice it gave me... and yes i already changed them...

sigbin #184410 28/08/07 03:01 PM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Why I asked is as I explained, if "X" (or for that matter "*!cservice@undernet.org" or even "*!*@*undernet.org") is in userlist as a named level, "on 1:.." events will NOT trigger for it.

Code:
on @*:join:#:{
  msg x verify $nick
}
on *:notice:& is logged in as &:?:{
  if $fulladdress == X!cservice@undernet.org && $istok($username,$6,32) {
    if $me isop #channel { pop 0 $v2 $$ial($1).nick }
  }
}

I just tested the above code and it worked as expected. (Obviously I used different names in the userlist alias)

If it doesn;t work for you, there must be something else happening. Most likely another on notice event, or another on join event, is triggering before this. Try adding it into a new file.

deegee #184418 28/08/07 05:08 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz man... yah ur ryt i have other on notice script.. thank for the help... thank you

sigbin #184689 31/08/07 03:02 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
if you get ANY RAW 330 reply from a whois they're registered and identified which fills your requirements for an op. Simply make the script op them.

RAW 330:*: mode #mychan +o $nick


I refuse to engage in a battle of wits with an unarmed person. wink

Link Copied to Clipboard