Author Topic: pop-up when someone in a particular country joins channel  (Read 7028 times)

chokchai20260

  • Newbie
  • *
  • Posts: 37
pop-up when someone in a particular country joins channel
« on: September 12, 2008, 04:17:37 PM »
I've figured out how to get events to fire based on text, but having problems with this one:

I want a popup to appear on the screen when someone from a particular country, example, "*.uk" joins a room which I'm in.

Any ideas?

Thanks

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: pop-up when someone in a particular country joins channel
« Reply #1 on: September 12, 2008, 05:32:09 PM »
What kind of scripting are we talking about?
The IceChat God

chokchai20260

  • Newbie
  • *
  • Posts: 37
Re: pop-up when someone in a particular country joins channel
« Reply #2 on: September 12, 2008, 07:30:46 PM »
Like an "On Join" but which checks the person country rather than their nick.

Windows_95

  • Newbie
  • *
  • Posts: 31
  • Who's cool and has two thumbs? This guy!
Re: pop-up when someone in a particular country joins channel
« Reply #3 on: September 12, 2008, 07:54:17 PM »
i don't think u can always check what country a person is from
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. Galileo Galilei

airikita

  • Newbie
  • *
  • Posts: 17
Re: pop-up when someone in a particular country joins channel
« Reply #4 on: September 12, 2008, 08:02:00 PM »
Question is, why would you? People are usually willing to answer a simple question.. and it's not like you have to urgently know, unless you have some sort of crack to say about someone, which isn't a good idea..

Windows_95

  • Newbie
  • *
  • Posts: 31
  • Who's cool and has two thumbs? This guy!
Re: pop-up when someone in a particular country joins channel
« Reply #5 on: September 12, 2008, 08:15:21 PM »
Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
If inStr(LCase(Host),Lcase(".uk")) then
  SendCommand "/echo " & Nickname & " is from United Kingdom",ServerNumber
elseif inStr(LCase(Host),Lcase(".au")) then
  SendCommand "/echo " & Nickname & " is from Australia",ServerNumber
elseif inStr(LCase(Host),Lcase(".us")) then
  SendCommand "/echo " & Nickname & " is from United States",ServerNumber
End If
End Sub

haven't really tested it but u could probably use that and i wasn't really sure what u meant by a popup so i just made it echo u where they're from oh yeah don't forget to save it as an .ice file
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. Galileo Galilei

chokchai20260

  • Newbie
  • *
  • Posts: 37
Re: pop-up when someone in a particular country joins channel
« Reply #6 on: September 12, 2008, 08:17:35 PM »
Thanks for that :)

I know you can't always check, but, if their server shows with, for example, ".uk" on the end, can you check?

Reason is simple, I quite like to chat with people who are local.

I know I can do a "/who *.uk", but that throws up hundreds of people not in the same channel I'm in . . . .

chokchai20260

  • Newbie
  • *
  • Posts: 37
Re: pop-up when someone in a particular country joins channel
« Reply #7 on: September 12, 2008, 08:19:47 PM »
Thanks Windows_95 - thats got me started - I'm sure i can modify from there.

Ch

airikita

  • Newbie
  • *
  • Posts: 17
Re: pop-up when someone in a particular country joins channel
« Reply #8 on: September 12, 2008, 09:31:15 PM »
.ca from canada, .fr from france..

Windows_95

  • Newbie
  • *
  • Posts: 31
  • Who's cool and has two thumbs? This guy!
Re: pop-up when someone in a particular country joins channel
« Reply #9 on: September 12, 2008, 10:22:24 PM »
Thanks Windows_95 - thats got me started - I'm sure i can modify from there.

Ch

yup no problem
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. Galileo Galilei

chokchai20260

  • Newbie
  • *
  • Posts: 37
Re: pop-up when someone in a particular country joins channel
« Reply #10 on: September 13, 2008, 04:34:39 PM »
Ok, this is what I have now
Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
If inStr(LCase(Host),Lcase(".th")) then
  MesBox Nickname & " joined from Thailand","Alert!",Buttons
elseif inStr(LCase(Host),Lcase(".totbb.net")) then
  MesBox Nickname & " joined from Thailand","Alert!",Buttons
End If
End Sub
How do I stop it from sending a message when I enter a new channel?

Thanks

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: pop-up when someone in a particular country joins channel
« Reply #11 on: September 13, 2008, 06:40:38 PM »
Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
if nickname = GetIdentifier("$me",servernumber) then Exit Sub
If inStr(LCase(Host),Lcase(".th")) then
  MesBox Nickname & " joined from Thailand","Alert!",Buttons
elseif inStr(LCase(Host),Lcase(".totbb.net")) then
  MesBox Nickname & " joined from Thailand","Alert!",Buttons
End If
End Sub
This message brought to you by the Wonderful Wizard of Oz.

chokchai20260

  • Newbie
  • *
  • Posts: 37
Re: pop-up when someone in a particular country joins channel
« Reply #12 on: September 13, 2008, 06:50:49 PM »
darn, so obvious when someone shows you . . .
Thanks  :-D