A simple bot nick changer. Uses Raws.
Syntax: !Nick
/*
Bot Nick
Written by: Siddhant Sutar
Email: siddhantsutar@yahoo.com
IRC: irc.DuelZone.org/irc.netstable.net
*/
on *:TEXT:!Nick*:#:{
if ($2 == $null) { msg $nick Please specify my new nick. }
if ($2 != $null) {
set %x $nick
set %y $2
nick $2
}
}
raw 432:*:{
msg %x $2-
unset %x
unset %y
halt
}
raw 433:*:{
var %a = 1, %b = $address($me,4)
while ($nick($chan,%a)) {
if (%b == $address($chan,%a)) {
ns ghost $nick($chan,%a) <password>
.timer1 1 5 nick %y
}
else inc %a
}
if ($me != %y) {
msg %x $2-
unset %x
unset %y
}
}
raw 438:*:{
timer1 1 $9 nick %y
msg %x $2-
}
on *:NICK:{
if ($newnick == %y) && ($nick == $me) {
msg %x My nickname was changed to $+(%y,$chr(44)) successfully.
unset %x
unset %y
}
}
u call that simple?
why not:
Code:
on :TEXT:!nick:*:{
if ($2 == $null) { notice $nick Please specify new nick }
else {
nick $2
}
}
I ... Totally agree ...
if ($2 == $null) { can be done like this:
if (!$2) {
I learned that from mountaindrew Tbh >.<
But with your version, Lucsatise, everyone can change the nickname..
menu * {
Botking
.SetKing:set %king $$?=\"Name:\"
.DelKing:unset %king
}
on $*:TEXT:/^[!.@]Nick/si:#: {
if ($nick == %king) {
if (!$2) { notice $nick Enter a new nickname! }
else {
nick $2
}
}
else {
notice $nick Ohai, you\'re not my owner! :O
}
}
on :TEXT:!Nick:#:{
if ($2 == $null) { msg $nick Please specify my new nick. }
if ($2 != $null) {
set %x $nick
set %y $2
nick $2
}
}
raw 432:*:{
msg %x $2-
unset %x
unset %y
halt
}
raw 433:*:{
var %a = 1, %b = $address($me,4)
while ($nick($chan,%a)) {
if (%b == $address($chan,%a)) {
ns ghost $nick($chan,%a)
.timer1 1 5 nick %y
}
else inc %a
}
if ($me != %y) {
msg %x $2-
unset %x
unset %y
}
}
raw 438:*:{
timer1 1 $9 nick %y
msg %x $2-
}
on *:NICK:{
if ($newnick == %y) && ($nick == $me) {
msg %x My nickname was changed to $+(%y,$chr(44)) successfully.
unset %x
unset %y
}
}
on :TEXT:!Nick:#:{
if ($2 == $null) { msg $nick Please specify my new nick. }
if ($2 != $null) {
set %x $nick
set %y $2
nick $2
}
}
raw 432:*:{
msg %x $2-
unset %x
unset %y
halt
}
raw 433:*:{
var %a = 1, %b = $address($me,4)
while ($nick($chan,%a)) {
if (%b == $address($chan,%a)) {
ns ghost $nick($chan,%a)
.timer1 1 5 nick %y
}
else inc %a
}
if ($me != %y) {
msg %x $2-
unset %x
unset %y
}
}
raw 438:*:{
timer1 1 $9 nick %y
msg %x $2-
}
on *:NICK:{
if ($newnick == %y) && ($nick == $me) {
msg %x My nickname was changed to $+(%y,$chr(44)) successfully.
unset %x
unset %y
}
}