Author Topic: Problems with mass greet script  (Read 4887 times)

Lauranator

  • Newbie
  • *
  • Posts: 14
Problems with mass greet script
« on: June 17, 2008, 09:46:45 PM »
Hey all, im sort of new to irc scripting, but I was wondering if someone could show me how a script would look that does a mass greet  to everyone in the channel?  Like I would just type an alias of /hi all and in the channel it would have me respond Hi nick1, nick2, nick3, nick4...listing everyones nick that's in the channel at that time.

Ive been trying all sorts of syntax and cant get it working.  Thx much.


HackBenjamin

  • Newbie
  • *
  • Posts: 35
Re: Problems with mass greet script
« Reply #1 on: June 18, 2008, 03:12:21 PM »
I know how you could do that, but wouldn't that just be annoying to everyone?

Lauranator

  • Newbie
  • *
  • Posts: 14
Re: Problems with mass greet script
« Reply #2 on: June 22, 2008, 09:26:57 AM »
No really.  Unless there are a lot of ppl in the channel, but the ones I go to there are not and sometimes I want to say Hi to ppl individually and not simply say Hi ALL..some ppl even like an indiv Hi to themselves.  I dunno, just thought it'd be cool to use sometimes.

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Problems with mass greet script
« Reply #3 on: June 22, 2008, 11:27:10 AM »
Code: [Select]
Function OUTTEXT(OutGoingText)
If OutGoingText = "!hiall" then
  Channel = GetIdentifier("$channel")
  ServerNumber = GetIdentifier("$currentservernumber")
  SendCommand "/msg " & Channel & " Hi " & Nicks(Channel,ServerNumber),ServerNumber
Else
OUTTEXT = OutGoingText
End If
End Function

you can trigger the script by typing !hiall
"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

Lauranator

  • Newbie
  • *
  • Posts: 14
Re: Problems with mass greet script
« Reply #4 on: June 24, 2008, 01:41:43 PM »
Thanx Morio, however it doesn't work.  I pasted the script into the scripts tab of the icechat editor and saved it.  But when in the channel I type !hiall nothing happens.  This usually happens when I put in any kind of !command based script, that nothing happens.   Is there something I have to enable somewhere?  or do I need to make !hiall an alias first?

How would I make this a right click popup instead tho?  so that the command isnt visible in the channel.

I really appreciate your help on this, thx.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Problems with mass greet script
« Reply #5 on: June 24, 2008, 02:54:38 PM »
Make sure the script is saved as an "IceChat 5 Script" style (.ICE).
The IceChat God

Lauranator

  • Newbie
  • *
  • Posts: 14
Re: Problems with mass greet script
« Reply #6 on: June 24, 2008, 10:01:37 PM »
OK...that worked. TY.  Odd to use 5 when I'm using icechat 7..but eh.

Only problem is that it lists MYSELF in with the other nicks.  Ive tried to figure out how to edit the script to eliminate myself from the nick list, but keep getting script errors.  I still have much to learn, I guess.

Also I still would like this to be a pop up menu rather than type /hiall ....ive tried making a popop in my usual way, but none work.

btw, when are you going to have another basic script writing tutorial here in the forum?  Thought the first one was really great.

Thx again.


Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Problems with mass greet script
« Reply #7 on: June 24, 2008, 11:21:09 PM »
To eliminate yourself, first store the nicks in a variable, then replace your nickname with emptiness:

Code: [Select]
AllNicks = Nicks(Channel,ServerNumber)
AllNicks = Replace(AllNicks,GetIdentifier("$me"),"")
SendCommand "/msg " & Channel & " Hi " & AllNicks,ServerNumber
"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

Lauranator

  • Newbie
  • *
  • Posts: 14
Re: Problems with mass greet script
« Reply #8 on: June 25, 2008, 12:11:16 AM »
Ahh that worked, Morio, TY very much!

 :-)