Nick Change

Moderator: GeekShed.Net Staff

Nick Change

Postby AdamD » Fri Dec 11, 2009 11:37 pm

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
AdamD
 
Posts: 44
Joined: Tue Nov 03, 2009 6:40 pm
Location: United Kingdom

Re: Nick Change

Postby GrimReaper » Sat Dec 12, 2009 1:55 pm

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.
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: Nick Change

Postby Nate » Sat Dec 12, 2009 6:13 pm

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 $+ .
}
}
Nate
 
Posts: 1
Joined: Fri Dec 11, 2009 8:21 pm

Re: Nick Change

Postby UncleJohn » Sun Dec 13, 2009 12:10 am

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.
UncleJohn
 
Posts: 31
Joined: Mon Oct 26, 2009 12:57 pm

Re: Nick Change

Postby edgy » Sun May 23, 2010 7:53 am

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))
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom


Return to Script help

Who is online

Users browsing this forum: No registered users and 13 guests

cron