mIRC Home    About    Download    Register    News    Help

Print Thread
#11678 17/02/03 03:57 AM
Joined: Jan 2003
Posts: 22
M
Marco Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
Hi
I have a script that says a phrase when i get in the channel but should only say the message in the channels that are listed on the ini files it works but when I join a channel that is not on the list it sends a blank message like this <marco>
how to avoid to send this blank line sto the channels that are not on the list?
Code:
 
on 1:join:*:{ 
  if ($nick == $me)  {
    set %joinmsg $readini system\joinchans.ini join $chan  
    msg $chan 7  [ [ %joinmsg ] ] 


  }
}
 


Joined: Feb 2003
Posts: 15
H
Pikka bird
Offline
Pikka bird
H
Joined: Feb 2003
Posts: 15
Code:
if (%joinmsg) msg $chan 7  [ [ %joinmsg ] ] 

This code should work, basically we're just checking to see if %joinmsg has a value before we send the msg to the chan.

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
on 1:join:*:{
if ($nick == $me) && ( $chan isin $read(channels.txt) ) {

that might not be exactly rite but along that lines basically you should need to scan the ini file with the channels for a match then execute

Joined: Jan 2003
Posts: 22
M
Marco Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
thanks guys smile


Link Copied to Clipboard