IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: SniperPro on August 13, 2008, 07:48:21 PM

Title: /Ghost script
Post by: SniperPro on August 13, 2008, 07:48:21 PM
A simple script that uses the Ghost command for anybody who gets on the nick "SniperPro"
Title: Re: /Ghost script
Post by: DarkStar 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. :)
Title: Re: /Ghost script
Post by: SniperPro 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?
Title: Re: /Ghost script
Post by: DarkStar 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.
Title: Re: /Ghost script
Post by: Snerf 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 :)
Title: Re: /Ghost script
Post by: SniperPro 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 ;_;
Title: Re: /Ghost script
Post by: DarkStar 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