Author Topic: Sweat Dreams  (Read 5978 times)

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Sweat Dreams
« on: February 24, 2008, 04:43:45 PM »
Is there any way to have it that when someone changes their nick to include a ZZZ or something, that my "bot will say "Sweet Dreams" To them?

-Sam
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Sweat Dreams
« Reply #1 on: February 24, 2008, 05:38:34 PM »
Well, yes, this is possible. But you will have to send the message to a specific channel, as nick changes are not channel based, but server based.

Code: [Select]
on *:NICK:if (zzz isin $newnick) /msg #mychannel Sweet Dreams $newnick
The IceChat God

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: Sweat Dreams
« Reply #2 on: February 24, 2008, 05:48:02 PM »
Thanks Snerf  :-)

-Sam
~ Sam
~ Visit my website at http://www.TheCellist42.com

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: Sweet Dreams
« Reply #3 on: February 24, 2008, 07:55:54 PM »
Is There Any Way To Also Have That Script Automatically De-Voice That User When Their Nick Changes?
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Sweat Dreams
« Reply #4 on: February 24, 2008, 08:25:16 PM »
Well, shot in the dark, but try this.

Code: [Select]
on *:NICK:{
if (zzz isin $newnick) {
/msg #mychannel Sweet Dreams $newnick
/mode #mychannel -v $newnick
}
The IceChat God

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: Sweat Dreams
« Reply #5 on: February 24, 2008, 08:53:54 PM »
Nope  :-). Sorry, I Couldn't Get It To Work.
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Sweat Dreams
« Reply #6 on: February 24, 2008, 09:10:37 PM »
Oops, forgot a bracket.

and it with another } on a new line
The IceChat God

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: Sweat Dreams
« Reply #7 on: February 24, 2008, 09:24:09 PM »
Really Sorry About This...I still can't get it to work. :-) :? :-)

-Sam
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Sweat Dreams
« Reply #8 on: February 24, 2008, 10:08:17 PM »
This is why I hate scripting, you always find some kind of a bug with the mirc script engine.
Just wait for a newer bug release.
The IceChat God

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Sweat Dreams
« Reply #9 on: February 24, 2008, 11:24:07 PM »
While waiting for that update, you could use this. Just remember that you need to save it as .ice not .ics

Code: [Select]
Sub ONNICK(NewNick,OldNick,ServerNumber)
If InStr(LCase(NewNick),"zzz") > 0 then
  SendCommand "/msg #mychannel Sweet dreams " & NewNick,ServerNumber
  SendCommand "/mode #mychannel -v " & NewNick
End If
End Sub

"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Sweat Dreams
« Reply #10 on: February 25, 2008, 12:13:55 AM »
Has to be saved as a seperate File, and as a IceChat 5 Script file type.

Code: [Select]
Sub ONNICK(NewNick,OldNick,ServerNumber)
If InStr(LCase(NewNick),"zzz") > 0 then
  SendCommand "/msg #mychannel Sweet dreams " & NewNick,ServerNumber
  SendCommand "/mode #mychannel -v " & NewNick, ServerNumber
End If
End Sub
The IceChat God