Nick Change
Posted:
Fri Dec 11, 2009 11:37 pm
by AdamD
What i mean by this is,
Does anyone have a script that does e.g
If i went in X-Chat and typed !nick <nick> the bot will change the nick to that
Thanks,
Adam
Re: Nick Change
Posted:
Sat Dec 12, 2009 1:55 pm
by GrimReaper
- Code: Select all
on *:TEXT:!nick*:#: {
if ($nick != YOURNICK) { msg $chan Sorry $nick $+ , You may not change my nick. }
if (!$2) { msg $chan Sorry $nick $+ , Syntax is !nick <new nick here> }
elseif ($nick == YOURNICK) && ($2) {
nick $2
.timer 1 1 msg $chan Nick has been changed.
}
}
Try that AdamD i just kind of quickly put it together.
I hope it works.
Re: Nick Change
Posted:
Sat Dec 12, 2009 6:13 pm
by Nate
GrimReaper wrote:- Code: Select all
on *:TEXT:!nick*:#: {
if ($nick != YOURNICK) { msg $chan Sorry $nick $+ , You may not change my nick. }
if (!$2) { msg $chan Sorry $nick $+ , Syntax is !nick <new nick here> }
elseif ($nick == YOURNICK) && ($2) {
nick $2
.timer 1 1 msg $chan Nick has been changed.
}
}
Try that AdamD i just kind of quickly put it together.
I hope it works.
A nice start, but this may be more secure than the one above (assuming your bot is run using the same computer):
- Code: Select all
On *:TEXT:!nick*:#:{
if (!$2) .notice $nick Syntax: !nick <new nickname>
elseif ($wildsite != $address($me,2)) .notice $nick Sorry, only my owner can change my nick.
else {
nick $2
.msg $chan Nick changed from $nick to $newnick $+ .
}
}
Re: Nick Change
Posted:
Sun Dec 13, 2009 12:10 am
by UncleJohn
Or
On *:TEXT:!nick *:#: {
if ($nick == YOURNICK) || ($address($nick,2) == @YOURHOST) && ($2) {
nick $2
}
elseif ($2 == $me) && ($nick == YOURNICK) || ($address($nick,2) == @YOURHOST) {
ns group MAINBOTNICK PASSWORD
}
}
Which will have the bot group the new nick if you type the bots current nick. If you want it to register seperate nicks replace the line with the ns register info.
Re: Nick Change
Posted:
Sun May 23, 2010 7:53 am
by edgy
UncleJohn wrote:On *:TEXT:!nick *:#: {
if ($nick == YOURNICK) || ($address($nick,2) == @YOURHOST) && ($2) {
nick $2
}
elseif ($2 == $me) && ($nick == YOURNICK) || ($address($nick,2) == @YOURHOST) {
ns group MAINBOTNICK PASSWORD
}
}
Would you not need to put () round the if statments?
Like:
- Code: Select all
if ($nick == YOURNICK) || ($address($nick,2) == @YOURHOST) && ($2)
Into:
- Code: Select all
if (($nick == YOURNICK) || ($address($nick,2) == @YOURHOST) && ($2))