mIRC Home    About    Download    Register    News    Help

Print Thread
#221799 29/05/10 05:47 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
Hi, i'm looking for ideas on how to make an auto ghost script, i.e I loss my connection, rejoin with alternative nick, an my primary nick is still sitting in the channel, and the script then ghosts my primary nick, and changes my current alternative to my regular nick.

Hope I explained this okay.

starpossen #221811 29/05/10 07:59 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Use on NOTICE event with a check to see if $nick == NickServ and look for the message that is sent when you're still showing as being connected (something like nick is in use). Then, if those match, send the command to ghost.


Invision Support
#Invision on irc.irchighway.net
starpossen #221813 29/05/10 08:01 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You have to fill the UPPER parts with your network and password.
This is for anope irc services and untested - I hope you get the idea anyway.
Also note that you must not open multiple connections to that network. The script else will likely ghost in circles laugh

Code:
; connect
on *:connect: {
  if ($network == YOURNETWORK) { 
    ; current nickname is not main nickname: try to take main nickname
    if ($me != $mnick) { nick $mnick }
    ; set "marker"
    set -eu10 %autoghost 1
  }
}

; raw "nick already in use"
raw 433:*: {
  if ($network == YOURNETWORK) {
    ; if nick in use is your main nickname and "marker" found
    if ($2 == $mnick) && (%autoghost == 1) {
      ; try to ghost that nickname
      msg nickserv ghost $2 YOURPASSWORD
      ; update "marker"
      set -eu10 %autoghost 2
    }
  }
}

; notice from nickserv
on *:notice:*:?: { 
  if ($network == YOURNETWORK) && ($nick == nickserv) {
    ; notice is "ghost killed" and updated "marker" found
    if ($1- == ghost with your nick has been killed.) && (%autoghost == 2) {
      ; try to take main nickname
      nick $mnick
      ; remove marker
      unset %autoghost
    }

    ; ##### this part is to "autoidentify" (optional) #####
    ; notice is "identify for nickname" and you're on your main nickname: identify for nick
    elseif (*identify*pass* iswm $1-) && ($me == $mnick) { msg nickserv identify YOURPASSWORD }
    ; ##### (end if optional autoidentify part) #####

  }
}


Link Copied to Clipboard