mIRC Homepage
Posted By: brad2 customizing quit and part messages?? - 01/07/03 02:35 AM
ok, i just got my joins customized:

Code:
  
on ^*:JOIN:#:{
  if ($nick != $me) {
    //echo # 14[14 $+ $time(hh:nntt) $+ 14] 7* 9Joins: $nick 14( $+ $address $+ ) 7«14 $nick($chan,0) total users ( $+ $nick($chan,0,o) ops,  $nick($chan,0,v,o) voices, $calc($nick($chan,0) - ($nick($chan,0,o) + $nick($chan,0,v,o))) others) 7» 
    haltdef
  }
}


How can i make it when I join a channel, it echos to me the number of users?

Now, i am trying to make the quits and parts customized too. the problem is, i can't get the quit message to show up.

I just get something like..

* Quits: Nick (address)

it wont show the quit message..

How do I do this?
Posted By: SladeKraven Re: customizing quit and part messages?? - 01/07/03 02:45 AM
Like this? sorry if I misread. I am quite tired. smile
Code:
on ^*:quit: {
  %quit.chan = $comchan($nick,1)
  set %qtemp 0
  :quit
  inc %qtemp 1
  if ($comchan($nick,%qtemp)) {
    echo 2 $comchan($nick,%qtemp) $ntime *** $nick has quit IRC ( $+ $1- $+ )
    goto quit
  }
  echo 2 -t $nick ( $+ $address $+ ) has quit IRC ( $+ $1- $+ )
  unset %qtemp
  haltdef
 }
Posted By: brad2 Re: customizing quit and part messages?? - 01/07/03 02:57 AM
Yep, thats it. smile Thanks...

Now, how can i make it display to me the number of users when i join a channel
Posted By: lammkott Re: customizing quit and part messages?? - 01/07/03 03:01 AM
Damn you do things the hard way....

Code:
on ^*:QUIT: {
  var %i = 1
  while ($comchan($nick,%i) {
    echo $color(quit) -t $ifmatch * Quit: $nick ( $+ $address $+ ) ( $+ $1- $+ )
    inc %i
  }
  haltdef
}


For returning the number of users on a channel use $nick($chan,0)
Here's some code I use...

Code:
on me:^*:join:#: {
  echo $color(join) -t * Now talking in: $chan
  .enable #join
  halt
}

#join off
raw 353:*: {
  echo $3 Users: @ - $nick($3,0,o) / % - $nick($3,0,h) / + - $nick($3,0,v) / regular - $nick($3,0,r) / total - $nick($3,0)
  halt
}
raw 366:*: { .disable #join | halt }
#join end
Posted By: brad2 Re: customizing quit and part messages?? - 01/07/03 03:04 AM
* /while: invalid format

????
Posted By: Collective Re: customizing quit and part messages?? - 01/07/03 03:06 AM
He just missed a ), while ($comchan($nick,%i)) {
Posted By: SladeKraven Re: customizing quit and part messages?? - 01/07/03 03:09 AM
Code:
alias users {
  set %users 1
  :next
  set %user $nick(#,%users)
  if (%user == $null)  { goto done }
  if (%user ison #)  { echo -t $chan %user is on $chan $+ . }
  inc %users
  goto next
  :done
}

on *:JOIN:#: {
 if ($nick == $me) { users }
}


I did read the post wrong. I thought you said list all the users on a channel. Oops. smile
Posted By: _D3m0n_ Re: customizing quit and part messages?? - 01/07/03 04:53 AM
Code:
on ^*:quit:{
  if ($1-) var %reason = ( $+ $1- $+ )
  var %i = 1
  while ($comchan($nick,%i)) {
    set -u10 %countnickz $calc($nick($comchan($nick,%i),0,a) - 1)
    echo $color(quit) -ti2 $ifmatch *** D3m0nicChaos Quits:8 $nick 12( $+ $address $+ ) %reason 15 $calc($nick($comchan($nick,%i),0,a) - 1) $iif((%countnickz == 1),4Chatter,4Chatters)
    inc %i
  }
  halt
}


thats what i used to make it count in my script ....... maybe its alil different than yours but i like mine as it takes in account saying your possibly the only one in the channel and changes the following from plural to singular ...... but then again thats just my taste in things also this can be modified to work with joins parts and kicks and every other event u wanna remodify ...... it then gives a count of users at the traling end of each one ..... nice neat and clean
Posted By: brad2 Re: customizing quit and part messages?? - 01/07/03 11:25 AM
Why won't this work for parts?

Code:
 

on ^*:PART: {
  var %i = 1
  while ($comchan($nick,%i)) {
    echo $color(quit) -t $ifmatch 14[14 $+ $time(hh:nntt) $+ 14] 7* 4Parts:15 $nick 14( $+ $address $+ ) 7(14 $+ $1- $+ 7)
    inc %i
  }
  haltdef
}

 
Posted By: ScatMan Re: customizing quit and part messages?? - 01/07/03 11:36 AM
u forgot the TARGET part: on ^*:part:#:
and u don't need a loop cuz u need to echo only in on channel

Posted By: SladeKraven Re: customizing quit and part messages?? - 01/07/03 06:20 PM
Code:
on ^*:PART:#: {
  if ($1- == $null) { echo $color(quit) $chan 14[14 $+ $time(hh:nntt) $+ 14] 7* 4Parts:15 $nick 14( $+ $address $+ ) 7(14 $+ No message given. $+ 7) }
  else { echo $color(quit) $chan 14[14 $+ $time(hh:nntt) $+ 14] 7* 4Parts:15 $nick 14( $+ $address $+ ) 7(14 $+ $1- $+ 7) }
  haltdef
} 

[07:18pm] * Parts: SladeKraven (DarkOne@=gvwfj.infinite-darkness.co.uk) (No message given)
[07:18pm] * Parts: SladeKraven (DarkOne@=gvwfj.infinite-darkness.co.uk) (...)
Posted By: brad2 Re: customizing quit and part messages?? - 01/07/03 10:47 PM
Ok thanks for all the help on the quit/part messages.

Now... how do i make it echo to me the number of users when I join a channel.

Code:
  

on me:^*:join:#: {
  echo $color(join) -t * Now talking in: $chan
  .enable #join
  halt
}
#join off
raw 353:*: {
  echo $3 Users:
  @ - $nick($3,0,o) / % - $nick($3,0,h) / + - $nick($3,0,v) / regular - $nick($3,0,r) / total - $nick($3,0)
  halt
}
raw 366:*: {
.disable #join | halt }
#join end



This doesnt do anything for me.

any ideas?

Also..

Code:
 
$nick($chan,0) total users ( $+ $nick($chan,0,o) ops,  $nick($chan,0,v,o) voices, $calc($nick($chan,0) - ($nick($chan,0,o) + $nick($chan,0,v,o))) others)  


i added that to the quit message. all it returns is

" total users ( ops, voices, 0 others) "

??????
Posted By: lammkott Re: customizing quit and part messages?? - 02/07/03 12:11 AM
I made a small mistake in the join event, I've left out the $chan in the echo command, it should read

echo $color(join) -t $chan * Now talking in: $chan

If you're still having problems with it message me.
Posted By: brad2 Re: customizing quit and part messages?? - 02/07/03 12:36 AM
still doesnt work..i messaged you
© mIRC Discussion Forums