mIRC Home    About    Download    Register    News    Help

Print Thread
#165467 26/11/06 04:05 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
I want to make a script so when someone sends a notice to my bot like [register] [name] [pass(whatever they want not the ns one lol)] it saves it then when they rejoin they send a notice to it like [id] [the nick they used]the bot will voice them for the channel. I just dont really know what to do. frown

Thank you.


Newbie Scripter. Learning pretty fast...lol :P
#165468 26/11/06 04:09 PM
Joined: Jan 2003
Posts: 53
Z
Babel fish
Offline
Babel fish
Z
Joined: Jan 2003
Posts: 53
have you made any attempt?
if not, asking for the whole script is the wrong way...

read the help file or learn from other scripts (there are various that do exactly what you want)

/help on notice
/help $readini
/help $ini
/help /writeini

is probably what you need for a start...

#165469 26/11/06 04:15 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
:\ I wasnt asking for the whole script. Was just asking for a what Id do for a start.


Newbie Scripter. Learning pretty fast...lol :P
#165470 26/11/06 09:43 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:notice:register*:?: {
  if (!$2 || !$3) {
    .notice $nick Incorrect format. To register, type: register name pass
  }
  else writeini login.ini Logins $2 $3
}
on *:notice:id*:?:{
  if ($1 == id && (!$2 || !$3)) {
    .notice $nick Incorrect format.  To identify, type: id name pass
  }
  elseif ($readini(login.ini,Logins,$2) == $3) {
    if ($me !isop [color:red]#yourchannel[/color]) { .notice $nick I'm not currently opped, so I cannot voice you.  Try identifying later, when I am an op. | return }
    mode [color:red]#yourchannel[/color] +v $nick
  }
  else .notice $nick Incorrect identification.
}


Try this. Replace the red with the channel name you're doing this for. Feel free to change the error messages to whatever you like.


Invision Support
#Invision on irc.irchighway.net
#165471 26/11/06 10:18 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
Thank you very much for this Riamus. smile


Newbie Scripter. Learning pretty fast...lol :P

Link Copied to Clipboard