Author Topic: /Ghost script  (Read 4835 times)

SniperPro

  • Newbie
  • *
  • Posts: 44
  • Have no fear! SniperPro is here! ;D
    • Myspace
/Ghost script
« on: August 13, 2008, 07:48:21 PM »
A simple script that uses the Ghost command for anybody who gets on the nick "SniperPro"

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: /Ghost script
« Reply #1 on: August 13, 2008, 09:52:14 PM »
Here you go.

Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
if not nickname = GetIdentifier("$me",ServerNumber) then
  tmp = GetINIFile("nickserv.ini",getidentifier("$network",ServerNumber),nickname,"")
  if len(tmp) > 0 then SendCommand "/msgsec nickserv ghost " & nickname & " " & tmp,ServerNumber
End if
End Sub
 
Sub ONNICK(NewNick,OldNick,ServerNumber)
if not NewNick = GetIdentifier("$me",ServerNumber) then
  tmp = GetINIFile("nickserv.ini",getidentifier("$network",ServerNumber),newnick,"")
  if len(tmp) > 0 then SendCommand "/msgsec nickserv ghost " & newnick & " " & tmp,ServerNumber
End if
End Sub

Make a file in your scripts folder called nickserv.ini; in the format of:

[NetworkName]
NicknameToProtect = Password

The script also works when someone joins a channel your in with a protected nickname, and of course, it checks to make sure your not using the nickname, dont want to ghost yourself. :)
This message brought to you by the Wonderful Wizard of Oz.

SniperPro

  • Newbie
  • *
  • Posts: 44
  • Have no fear! SniperPro is here! ;D
    • Myspace
Re: /Ghost script
« Reply #2 on: August 13, 2008, 11:01:42 PM »
Thank you so much.

Also, another question, I don't really know what you mean, so far I just added it to the scripts section, what else should I do?

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: /Ghost script
« Reply #3 on: August 14, 2008, 01:16:16 AM »
After saving the file you need to configure it, to do this, make a file in the scripting directory (type //run $scriptdir ) called nickserv.ini

Now for an example, Im on a network called Nexusnet, nickname DarkStar, and my password is "icechat"; so in the file I put

[NexusNet]
DarkStar = Icechat

click Save and your done.
This message brought to you by the Wonderful Wizard of Oz.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: /Ghost script
« Reply #4 on: August 14, 2008, 12:34:16 PM »
Gee, you think that making a simple /ghost alias would work just as well.
You guys sure have a way of complicating things :)
The IceChat God

SniperPro

  • Newbie
  • *
  • Posts: 44
  • Have no fear! SniperPro is here! ;D
    • Myspace
Re: /Ghost script
« Reply #5 on: August 14, 2008, 06:05:18 PM »
lol, I'm sorry, I couldn't find my way out of a card board box, much less thinking of these things ;_;

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: /Ghost script
« Reply #6 on: August 15, 2008, 04:59:55 AM »
Snerf I thought you knew by now Im lazy.. If It can be automated.. Why not? :D
This message brought to you by the Wonderful Wizard of Oz.