mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
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?

Last edited by brad2; 01/07/03 02:39 AM.
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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
 }

Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
Yep, thats it. smile Thanks...

Now, how can i make it display to me the number of users when i join a channel

Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
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

Last edited by lammkott; 01/07/03 03:09 AM.

- Jason
Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
* /while: invalid format

????

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
He just missed a ), while ($comchan($nick,%i)) {

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

Last edited by SladeKraven; 01/07/03 03:15 AM.
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
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


D3m0nnet.com
Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
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
}

 

Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
u forgot the TARGET part: on ^*:part:#:
and u don't need a loop cuz u need to echo only in on channel


Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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) (...)

Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
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) "

??????

Last edited by brad2; 01/07/03 11:43 PM.
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
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.


- Jason
Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
still doesnt work..i messaged you


Link Copied to Clipboard