Author Topic: Auto greet for spesific user  (Read 9618 times)

ARS

  • Guest
Auto greet for spesific user
« on: September 10, 2009, 12:48:08 AM »
Dear all, i'm newbie here... and looking for help :D

Does anyone know how to make auto greet just for spesific user? For example, I just want to greet "John" when joining to room but not for others.

[14:35] * John (john @ bla.bla.bla.bla) has joined #channel
[14:35] <ME> Welcome Back [John]



Thanks before :)


*sorry if my english bad, i'm indonesian :D

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Auto greet for spesific user
« Reply #1 on: September 10, 2009, 08:44:19 AM »
Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
if Nickname="John" then
  SendCommand "/msg " & channel & " Welcome back ["& nickname &"]",ServerNumber
End If
End Sub

If you want it to match the nickname john while being case insensitive, change line two to:

Code: [Select]
if lcase(Nickname)="john" then
Be sure to note that the value you are comparing it to, the one inside of the "quotes" must be all lower case when using lcase()

When you save the script, be sure to change the extension to a .ICE file, that is Icechat 5 scripting, NOT .ICS

Hope that helps.
This message brought to you by the Wonderful Wizard of Oz.

ARS

  • Guest
Re: Auto greet for spesific user
« Reply #2 on: September 10, 2009, 06:06:50 PM »
Thanks DarkStar, let me try

ARS

  • Guest
Re: Auto greet for spesific user
« Reply #3 on: September 11, 2009, 02:05:08 AM »
wow, great! It's worked!

but, how if i want to add another nickname (multiple nickname)?

ElementAlchemist

  • Newbie
  • *
  • Posts: 1
Re: Auto greet for spesific user
« Reply #4 on: September 11, 2009, 08:21:18 AM »
Just change the if statement:
Code: [Select]
if lcase(Nickname)="john" or lcase(Nickname)="bob" then

ARS

  • Guest
Re: Auto greet for spesific user
« Reply #5 on: September 11, 2009, 08:42:20 PM »
Just change the if statement:
Code: [Select]
if lcase(Nickname)="john" or lcase(Nickname)="bob" then
nice!

so, if want to add more nickname, just add like this?
Code: [Select]
if lcase(Nickname)="john" or lcase(Nickname)="bob" or lcase(Nickname)="jane" or lcase(Nickname)="michael" or lcase(Nickname)="roy" then

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Auto greet for spesific user
« Reply #6 on: September 11, 2009, 09:15:03 PM »
Yes, although at that stage it may be easier to become file dependent, although it seems kinda overkill for such a simple script.
This message brought to you by the Wonderful Wizard of Oz.

ARS

  • Guest
Re: Auto greet for spesific user
« Reply #7 on: September 11, 2009, 09:52:04 PM »
allright then, thanks alot! ;)

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Auto greet for spesific user
« Reply #8 on: November 03, 2010, 03:13:40 AM »
Not to necro this thread, but this running congruently with icequote would be a ridiculous amount of utility and appeal to how I'm seeing these used.  Snerf has seen it but I actually have a spare clunker computer that acts as a bot only for the quote mechanisms.

The autogreet is usually asked to be kept on since in 20-50ish population channels (I checked  :-D )
I've noticed both humorously and despairingly enough that lots of people respond to Cscripts autogreet with both knowingly and unknowingly--adding a personalized greeting mechanism would not only be hilarious, but is dangerously close to AI (considering the average intelligence on most irc servers)


rachel12

  • Newbie
  • *
  • Posts: 1
Re: Auto greet for spesific user
« Reply #9 on: January 16, 2011, 08:02:13 PM »
Wow, Thanks dear for helping me too. I was also wanted to grret my friend but not know how. But now I can with your help. Thanks again. :-)

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Auto greet for spesific user
« Reply #10 on: January 17, 2011, 02:11:06 PM »
Darkstar gave the script on what to use, in the 2nd post.
Just change the nickname from "John" to whatever the nickname of your friend is.
The IceChat God

MervinRoss

  • Newbie
  • *
  • Posts: 1
Re: Auto greet for spesific user
« Reply #11 on: May 02, 2011, 10:21:31 PM »
Its really amazing, I will also try it out.