mIRC Homepage
Posted By: jordan remove certain join/leave messages - 22/02/13 07:00 AM
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?
Posted By: sparta Re: remove certain join/leave messages - 22/02/13 07:12 AM
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.
}
Posted By: Wims Re: remove certain join/leave messages - 22/02/13 07:33 AM
You missed the ^ event prefix for the on join event wink
Posted By: jordan Re: remove certain join/leave messages - 22/02/13 08:19 AM
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
  }
}
Posted By: sparta Re: remove certain join/leave messages - 22/02/13 09:09 AM
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
}
Posted By: jordan Re: remove certain join/leave messages - 22/02/13 09:49 AM
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
Posted By: 5618 Re: remove certain join/leave messages - 22/02/13 09:52 AM
(Guest isin $nick) and (guest isin $nick) are identical if-statements. If you want a case-sensitive match use the 'isincs' operator.
Posted By: jordan Re: remove certain join/leave messages - 22/02/13 10:09 AM
oh didn't know that.
It still doesn't output messages
Posted By: 5618 Re: remove certain join/leave messages - 22/02/13 10:12 AM
Paste what you have now.
Did you change BOTH if-statements?
Posted By: jordan Re: remove certain join/leave messages - 22/02/13 10:12 AM
on ^*:quit:#: {
if (guest isin $nick) { haltdef }
}
on ^*:join:#: {
if (guest isin $nick) { haltdef }
}
Posted By: sparta Re: remove certain join/leave messages - 22/02/13 11:14 AM
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 }
}
Posted By: Deega Re: remove certain join/leave messages - 22/02/13 04:31 PM
There is no location field (where you have "#") in quit events...
Code:
on ^*:quit:{
  if (Guest isin $nick) { haltdef }
}

Posted By: sparta Re: remove certain join/leave messages - 22/02/13 04:32 PM
didnt even notice it was there. :P This happens when you read the txt to fast.
© mIRC Discussion Forums