mIRC Home    About    Download    Register    News    Help

Topic Options
#2682 - 20/12/02 10:35 AM Newbie, need help with a simple greeting script
Gwion Offline
Pikka bird

Registered: 20/12/02
Posts: 18
Hi,

I'd like to greet visitors joining my channel with a message that gives some info. Joining visitors mainly have the nick guestxyz (xyz is a number) but some
have other nicks. The guest visitors should get a different message if possible.
I have no clues (well, only very few) about scripting and would need a detailed help how to write that.

Thanks in advance.
Gwion

Top
#2683 - 20/12/02 10:40 AM Re: Newbie, need help with a simple greeting script
watcher Offline
Ameglian cow

Registered: 15/12/02
Posts: 18
Loc: Finland
Code:
on *:join:#chan:{
  if $nick != $me {
   if guest* iswm $nick { msg $nick ... }
   else { msg $nick .... }
 }
}

:]


Edited by watcher (20/12/02 10:49 AM)
_________________________
-watcher

Top
#2684 - 20/12/02 10:59 AM Re: Newbie, need help with a simple greeting script
Gwion Offline
Pikka bird

Registered: 20/12/02
Posts: 18
Hi,

Thanks.
The message now appears in the status window.
Is there a way to display it in the main channel window for the user?

Gwion

Top
#2685 - 20/12/02 11:00 AM Re: Newbie, need help with a simple greeting script
watcher Offline
Ameglian cow

Registered: 15/12/02
Posts: 18
Loc: Finland
msg # smile
_________________________
-watcher

Top
#2686 - 20/12/02 11:03 AM Re: Newbie, need help with a simple greeting script
landonsandor Offline
Hoopy frood

Registered: 12/12/02
Posts: 1527
Loc: state of confusion
try:

on !*:join:#mychannel:{
if guest* iswm $nick { msg $chan $nick ... }
else { msg $chan $nick .... }
}

You should only do this for channels that say you can. All other channels MIGHT ban you for this kind of stuff. Some things to note:

1) the ! switch replace if ($nick != $me)
2) #mychan is your channel (not somebody else's) unless you get approval from the ops in another channel to use that
_________________________
Those who fail history are doomed to repeat it

Top
#2687 - 21/12/02 08:35 PM Re: Newbie, need help with a simple greeting script
The_Game Offline
Hoopy frood

Registered: 10/12/02
Posts: 1237
Loc: Michigan, USA
on *:JOIN:#: {
/notice $nick <messag>!
}

That works for me anyways....i can see it in my channel window but whom ever states it usually shows it in their status (i like to keep it simple)

Top