mIRC Homepage

Quits + Nick changes

Posted By: dsq

Quits + Nick changes - 10/12/02 10:46 PM

I know the on commands for them but how do i get them to echo in the channel they quit in or changed thier nick in. thanks.....
Posted By: KennyJ

Re: Quits + Nick changes - 10/12/02 11:25 PM

on 1:quit:{
set %quitmessage $1-
echo -a %quitmessage

on 1:nick:{
set %nnick $nick
set %nenick $newnick
echo -a %%nnick to %nenick
Hope this help. I'm not sure with the ON correct or not, but the rest is correct.
Posted By: dsq

Re: Quits + Nick changes - 10/12/02 11:30 PM

No i want it to echo in the chans that only that person is in for quits and nick changes crazy
Posted By: KennyJ

Re: Quits + Nick changes - 10/12/02 11:39 PM

try use
echo - $+ $active
or echo $active
I think, you can set up Under mirc Option, EVENTS to see when users quit and change nicks in that specific channels.
Posted By: Hammer

Re: Quits + Nick changes - 10/12/02 11:58 PM

Neither on QUIT nor on NICK have a $chan associated with them. In order to correctly place them in the channels where they "occured," you must loop through $comchan($nick,%i), and then halt the default text. For example, follow these examples and modify them to suit yourself.
on ^*:QUIT:{
  ; Create a clean quit message surrounded by parenthesis if a quit message has been supplied. This
  ; lets us maintain mIRC's use of parenthesis but allows for a network that doesn't force a quit message.
  if ($1-) var %Quit.Message = ( $+ $1- $+ )
  ; Prepare to loop through each common channel you shared with them, starting with the first channel.
  ; We know we share at least one channel with them because we would not have seen the QUIT (or,
  ; below, the NICK) event.
  var %i =1
  ; While there are more common channels, keep echoing.
  while ($comchan($nick,%i)) {
    ; This particular echo imitates mIRC's own quit, so modify it to suit yourself. The echo flags make the
    ; echo behave the way any normal mIRC quit message would echo based on the user's own settings.
    ; $ifmatch will return the name of the channel that was found in the while condition, so that is where
    ; we will echo the quit to.
    echo $color(quit) -lbfti2 $ifmatch * Quits: $nick ( $+ $address $+ ) %Quit.Message
    ; Go to the next channel.
    inc %i
  ; Echo it to their query window, if you had one open to them when they quit.
  if ($query($nick)) echo $color(quit) -lbfti2 $nick * Quits: $nick ( $+ $address $+ ) %Quit.Message
  ; Halt mIRC's default quit message.
; The same comments apply to on NICK as are shown above in on QUIT, so they will not be repeated.
; This will also give you a better idea of what the script looks like without all those pesky comments!
; If you don't care to echo nick changes to their query window, comment out or delete the IF line above
; the haltdef. Also, there is no %Nick.Message.
on ^*:NICK:{
  var %i = 1
  while ($comchan($nick,%i) {
    echo $color(nick) -lbfti2 $ifmatch * $nick is know known as $newnick
    inc %i
  if ($query($nick)) echo -lbfti2 $nick * $nick is now known as $newnick
Posted By: Sartan

Re: Quits + Nick changes - 11/12/02 04:01 AM

or with less spam...
on *:quit:{ var %i 1 | while ($comchan($nick,%i)) { echo $ifmatch $nick [ $wildsite ] has left IRC $1- | inc %i } }
on *:nick:{ var %i 1 | while ($comchan($nick,%i)) { echo $ifmatch $nick is now known as $newnick | inc %i } }
no # for quit/nick/dcc etc... must have a # associated with it to return #.. /help $comchan.. smirk
© 2019 mIRC Discussion Forums