All pastes #461563 Raw Edit

count problem

public text v1 · immutable
#461563 ·published 2007-04-27 19:12 UTC
rendered paste body
on *:START: { 
  hmake jcount 100 
  if ($isfile(jcount.dat)) hload jcount jcount.dat 
} 

on *:EXIT: hsave -o jcount jcount.dat 

on !*:JOIN:#: {
  if (%chan == #ToMo) { halt }
  if (%chan == #Convict) { halt }
  if ( $hget(jcount,$+($network,.,$chan,.,$nick)) ) {
    tokenize 32 $v1
    var %t = $calc($1 + 1)
	.msg $chan Welcome Back $nick $+ . Last time you joined $chan was on $2 $+ , $duration($calc($ctime - $3)) ago $+ . (Your total visits: %t $+ )
    hadd -m jcount $+($network,.,$chan,.,$nick) %t $asctime(mm/dd/yyyy) $ctime
  }
  else { 
    hinc -m jcount $+($network,.,$chan,.,total.count)
    .msg $chan Welcome $nick $+ ! You're visitor $chr(35) $+ $hget(jcount,$+($network,.,$chan,.,total.count)) to join $chan $+ .
    hadd -m jcount $+($network,.,$chan,.,$nick) 1 $asctime(mm/dd/yyyy) $ctime
  }
}
  if ($chan == #Jhu) { 
    if ($nick == Newbeebot) { halt }
    if ($nick == ToMo) {
      msg $chan Hey ToMo learn me more learn meeee MOORE please!!!! 
    }
    if ($nick == Ali) {
      msg $chan Hey Ali What about to raise my english level? :) 
    }
    if ($nick == Carlambor) {
      msg $chan Hey Carl When we start bombadiert the station? xD  
    }
    if ($nick == Jhu) {
      msg $chan Hey Master!  Glad to see you back here!! At your service!! If you know how to use me well of course :x
    }
if ($nick == Convict) {
      msg $chan Hey Convict!! So you continue to steal Houses those days? :) 	
  }
  if ($nick == Flameo) {
      msg $chan Hey Flameo!! Where's your bot?I never see him, and i need a bot friend..Humans are so rude :) 
  }
  msg $chan *** Hello $nick ! Dont be a moron here or i kick your ass out of $chan *** 
 }
} 
 on *:PART:#: { 
   if ( $chan == #Jhu ) { 
    if ( $nick == Newbeebot ) { /msg $chan Parting | halt }
   msg $chan *** $nick has left  $chan  and its NOT my fault! }
 }
 on *:KICK:#: { 
  if ( $chan == #Jhu ) { 
  msg $chan *** $nick has seen his ass kicked from $chan and perhaps its better like this ( $+ $1- $+ ) }
} 
 on *:text:!lol:#: { /msg $chan HmmMM someone ask me to laugh? well its not a function i understand so much...as a bot its hard to understand human feeling...but lets try:.............LOL......ahem..... }
 on *:text:moo:#: { /msg $chan OMG you're a COW! }
 on *:text:Oo:#: { /msg $chan  !Ôô!  }
 on 1:text:*:#: {
  if ($1 == :o) {
    msg $chan HAR HAR
   }
 }