Botscript / !nick <nick>

Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!

Botscript / !nick <nick>

Postby Cristian » Sat Mar 22, 2008 10:43 pm

Code: Select all
;# 
;# visit http://sp00fed.dk for updates or support.
;# script by Sumsar
;#

;# Tested and works on version 6.15

;# This script when triggered, checks if the wanted nickname is availible before trying to make a nickchange.
;# It will also check if the wanted nickname is above 15 characters, since Quakenet only support 15 characters nicknames.
;# Trigger: !nick <nick>

on *:TEXT:!nick *:# {
  if ($2) {
    if ($len($2) <= 15) { .set %ison $nick $2 | ison $2 }
    else {
      .notice $nick Warning: MAX 15 chars is allowed. $2 contains $len($2) chars.
    }
  }
  else {
    .notice $nick Syntax: !nick <nick>
  }
}

raw 303:*: {
  if (%ison) {
    if ($2 && $gettok(%ison,2,32) == $2) {
      .notice $gettok(%ison,1,32) Warning: $2 is taken.
    }
    else {
      .nick $gettok(%ison,2,32)
      .notice $gettok(%ison,1,32) Done: Changing nick to $gettok(%ison,2,32) $+ .
    }
    .unset %ison
  }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Return to Mirc Scripting Release

Who is online

Users browsing this forum: No registered users and 1 guest

cron