mIRC Home    About    Download    Register    News    Help

Print Thread
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?

Joined: Feb 2003
Posts: 3,432
S
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,.) }
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
You missed the ^ event prefix for the on join event wink


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
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.
Joined: Feb 2003
Posts: 3,432
S
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,.) }
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

Joined: Jun 2007
Posts: 933
5
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.

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.
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Paste what you have now.
Did you change BOTH if-statements?

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 }
}

Joined: Feb 2003
Posts: 3,432
S
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,.) }
Joined: Oct 2012
Posts: 164
D
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 }
}


Joined: Feb 2003
Posts: 3,432
S
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,.) }

Link Copied to Clipboard