mIRC Home    About    Download    Register    News    Help

Print Thread
Auto Ghost #221799 29/05/10 05:47 PM
Joined: Oct 2005
Posts: 98
S
starpossen Offline OP
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.

Re: Auto Ghost [Re: starpossen] #221811 29/05/10 07:59 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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
Re: Auto Ghost [Re: starpossen] #221813 29/05/10 08:01 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
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) #####

  }
}