mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2006
Posts: 6
P
peachey Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2006
Posts: 6
Code:
;================================
;= Autogreet by Peachey
;= Mailto: p858snake@yahoo.com.au
;================================

on *:JOIN:#:{
  describe $active welcomes $nick -- Welcome to $chan ,How may we help you? We hope you enjoy your stay in $chan
}


I have this script running from my MIRC which controls the 2 channels i help run (#pweb and #peachhut[mine]) when someone joins either channel it produces this:

[10:14] * @peachbot welcomes peachey -- Welcome to #Pweb ,How may we help you? We hope you enjoy your stay in #Pweb

and if someone joins both channels:

[10:14] * @peachbot welcomes peachey -- Welcome to #Pweb ,How may we help you? We hope you enjoy your stay in #Pweb
[10:14] * @peachbot welcomes peachey -- Welcome to #peachhut ,How may we help you? We hope you enjoy your stay in #peachhut

Is their a way to edit the script so it only shows the #pweb one in the #pweb channel and the #peachhut welcome in #peachhut

Thanks in advance.
Peachey

Joined: Jul 2006
Posts: 53
O
Babel fish
Offline
Babel fish
O
Joined: Jul 2006
Posts: 53
Code:
 
on *:JOIN:#:{
  if ($chan == #pweb) { 
    describe $active welcomes $nick -- Welcome to $chan ,How   may we help you? We hope you enjoy your stay in $chan
  }
  if ($chan == #peachhut) { 
    describe $active welcomes $nick -- Welcome to $chan ,How may we help you? We hope you enjoy your stay in $chan
  }
} 


try that

Last edited by oblivious; 16/07/06 01:07 AM.
Joined: Jan 2006
Posts: 468
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
Hi, use this
Code:
on *:JOIN:#Channel_name:{  
  describe # welcomes $nick -- Welcome to $chan ,How may we help you? We hope you enjoy your stay in #
}


Or you can use this.
Code:
on *:JOIN:#:{  
  if $istok(#channel1 #channel2 #channel3 , $chan , 32) {
    describe # welcomes $nick -- Welcome to $chan ,How may we help you? We hope you enjoy your stay in #
  }
}


These codes will work for you, but if you are running it in more than one channel, I recommend the 2nd code.
PS: you can add as many channels as you want, separate them with spaces.

Regards,

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
The problem is that you are sending the message to $active. $active returns the window that is currently active/open on your mIRC. The identifier you need to use is $chan. $chan returns the channel where the event was triggered (ie, where the user joined).

-genius_at_work

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Quote:

Or you can use this.
Code:
on *:JOIN:#:{  
  if $istok(#channel1 #channel2 #channel3 , $chan , 32) {
    describe # welcomes $nick -- Welcome to $chan ,How may we help you? We hope you enjoy your stay in #
  }
}


Why not use the on *:JOIN:#channel1,#channel2,#channel3: { } already in existance?


-KingTomato
Joined: Jul 2006
Posts: 3
K
Self-satisified door
Offline
Self-satisified door
K
Joined: Jul 2006
Posts: 3
Code:
on *:JOIN:#:{
  /describe $chan welcomes $nick -- Welcome to $chan ,How may we help you? We hope you enjoy your stay in $chan
}


Link Copied to Clipboard