mIRC Home    About    Download    Register    News    Help

Print Thread
remove certain join/leave messages #240690 22/02/13 07:00 AM
Joined: Feb 2013
Posts: 5
J
jordan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2013
Posts: 5
lets say I had the following incoming messages

*(*) has joined #*
* *(*) Quit (*)

how would I remove those from flooding my chat?

furthermore if the user billy or jack enter the chat it will still show the join/lave message?

Re: remove certain join/leave messages [Re: jordan] #240692 22/02/13 07:12 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
You need to use $comchan() for this, then filter out the quit messages you dont want to se. This code is untested, but should work, but you need to add the filter you want.
Code:
on ^*:quit: {
  haltdef
  var %x = 1
  while ($comchan($nick,%x)) {
    echo -mt $comchan($nick,%x) $address quit $1-
    inc %x
  }
}

For the join part you only need to use:
Code:
on ^*:join:#: {
  haltdef
  ;add filter
  ;make the echo on who joined.
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: remove certain join/leave messages [Re: sparta] #240693 22/02/13 07:33 AM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
You missed the ^ event prefix for the on join event wink


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: remove certain join/leave messages [Re: sparta] #240694 22/02/13 08:19 AM
Joined: Feb 2013
Posts: 5
J
jordan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2013
Posts: 5
I tried the following but it doesn't seem to work it only shows their hostname quit Reason
doesn't show joins at all

Code:
on ^*:quit: {
  haltdef
  var %x = 1
  while ($comchan($nick,%x)) {
    if($nick == /Guest*/)
    {
      haltdef
    }
    inc %x
  }
}
on ^*:join:#: {
  if($nick == /Guest*/)
  {
    haltdef
  }
}

Last edited by jordan; 22/02/13 09:07 AM.
Re: remove certain join/leave messages [Re: jordan] #240695 22/02/13 09:09 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
 if (guest isin $nick) { do somthing }
 else {
  do somthing else
}

And you dont need "haltdef" in more then one place.
Code:
on ^*:quit: {
 haltdef
 ; rest of code here
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: remove certain join/leave messages [Re: sparta] #240696 22/02/13 09:49 AM
Joined: Feb 2013
Posts: 5
J
jordan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2013
Posts: 5
Code:
on ^*:quit:#: {
  if (guest isin $nick) { echo test1}
  else if (Guest isin $nick) { echo test2}
}
on ^*:join:#: {
  if (guest isin $nick) { echo test3 }
  else if (Guest isin $nick) { echo test4}
}


For some reason all the quits work but when a user joins using Guest* it still outputs them joining

Re: remove certain join/leave messages [Re: jordan] #240697 22/02/13 09:52 AM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
(Guest isin $nick) and (guest isin $nick) are identical if-statements. If you want a case-sensitive match use the 'isincs' operator.

Re: remove certain join/leave messages [Re: 5618] #240698 22/02/13 10:09 AM
Joined: Feb 2013
Posts: 5
J
jordan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2013
Posts: 5
oh didn't know that.
It still doesn't output messages

Last edited by jordan; 22/02/13 10:12 AM.
Re: remove certain join/leave messages [Re: jordan] #240699 22/02/13 10:12 AM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Paste what you have now.
Did you change BOTH if-statements?

Re: remove certain join/leave messages [Re: 5618] #240700 22/02/13 10:12 AM
Joined: Feb 2013
Posts: 5
J
jordan Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2013
Posts: 5
on ^*:quit:#: {
if (guest isin $nick) { haltdef }
}
on ^*:join:#: {
if (guest isin $nick) { haltdef }
}

Re: remove certain join/leave messages [Re: jordan] #240702 22/02/13 11:14 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on ^*:quit: {
  haltdef
 ; This will display notihing if a user that have guest in the nick quit.
 if (guest isin $nick) { return }
  ; this will show every one else
  ; the $1- contain all the info for the user.
  ; and you need $comchan(), if you dont use it the quit will
  ; only show up in the active channel.
 else {
  echo -mt $1-
}
on ^*:join:#: {
 ; same here as abow.
 if (guest isin $nick) { haltdef }
}

Last edited by sparta; 22/02/13 04:33 PM. Reason: Removed # sign.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: remove certain join/leave messages [Re: jordan] #240704 22/02/13 04:31 PM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
There is no location field (where you have "#") in quit events...
Code:
on ^*:quit:{
  if (Guest isin $nick) { haltdef }
}


Re: remove certain join/leave messages [Re: Deega] #240705 22/02/13 04:32 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
didnt even notice it was there. :P This happens when you read the txt to fast.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }