Join/Part Date&Time

By Warriorii on Mar 11, 2011

This snippet will tell you the date and time someone joins and parts your channel. it has a channel selector so u can control the channels it is used in. To add a channel just go to the channel u want added then right click in the channel then go to Join/Part Switch then click on Add Channel. Once u make it that far u can see how to delete a channel.

Just add to a clean remote and save as Join-Part.mrc. If u dont save it with that name part of it will not work.

I know it isnt much lol, but at least it's something. :)

menu channel {
  Join/Part Switch
  . $iif($group(#join-part) == on,$style(1) <=- Enabled -=>,Enabled): enable #join-part
  . $iif($group(#join-part) == off,$style(1) Disabled,<=- Disabled -=>): disable #join-part
  .-
  .List Channels: /.play -e join-part.txt
  .-
  .Add Channel: {
    if (!$read(join-part.txt , w ,$chan)) {
      write join-part.txt $chan
      echo  0,12 $chan added to join-part.txt 
    }
    else echo 0,12 $chan Is already in join-part.txt 
  }
  .Del Channel: {
    if ($read(join-part.txt , w ,$chan)) {
      write -ds $+ $chan join-part.txt
      echo $ka2 $+ 8,4 $chan Removed from join-part.txt  $+ $ka2
    }
    else echo $ka $+ 9,1 $chan Is not in join-part.txt  $+ $ka 
  }
  .-
  .Send To $$1:Send $$1 $script | /msg $chan 12Move Join-Part.mrc To main mIRC dir | /say 12then type===> 4 /load -rs Join-Part.mrc
}
#join-part on
on *:JOIN:#: jp
on *:PART:#: jp
alias -l jp {
  if (!$read(join-part.txt , w ,$chan)) { return }
  .echo $chan $iif($event = join,$jn2,$pt2) $+ 9,1 $nick $iif($event = join,joined,left) $chan at $time(hh:nn tt) on $date(ddd mmm/d/yy)  $+ $iif($event = join,$jn2,$pt2)
  }
alias jn return 14,5J15,4OI14,5N
alias jn2 return 14,5T15,4IM14,5E
alias pt return 14,2P15,12AR14,2T
alias pt2 return 14,2T15,12IM14,2E
#join-part end

Comments

Sign in to comment.
Jethro   -  Mar 13, 2011

Perhaps you don't need channel names to store in a txt file but the variable. The variable can hold well around 4000 data (I mean, it's hard to imagine you will store more 4000 channel names.), which is more than sufficient:

alias -l jn return 14,5J15,4OI14,5N
alias -l jn2 return 14,5T15,4IM14,5E
alias -l pt return 14,2P15,12AR14,2T
alias -l pt2 return 14,2T15,12IM14,2E
menu channel {
  Add/Remove Channel
  .$iif($findtok(%c,#,1,32),Delete,Add) # {
    if !$istok(%c,#,32) {
      echo # # Added!
      set %c $addtok(%c,#,32)
    }
    else {
      echo # # Removed!
      set %c $remtok(%c,#,1,32)
    }
  }
  .List Channels:echo # %c
}
on !*:join:#:jp
on !*:part:#:jp
alias -l jp {
  if $istok(%c,#,32) {
    .echo # $iif($event = join,$jn2,$pt2) $+ 9,1 $nick $&
      $iif($event = join,joined,left) # at $time(hh:nn tt) $&
      on $date(ddd mmm/d/yy)  $+ $iif($event = join,$jn2,$pt2)
  }
}

Thanks to gooshie's original example. :p

 Respond  
Warriorii   -  Mar 13, 2011

I put it in a program on my computer to test it not here. Yes i tested my previous and it works fine and i havent put it in that one yet. I wanted to try it out on another script first then i was going to put it in this last one. one thing, it was trying to create a file for every channel I tried to add like this....#warlock and those were in my mirc dir. Oh well, I'll just leave it as is......

 Respond  
gooshie   -  Mar 13, 2011

Warriorii
You probably dont have permission to write to the directory. It is the same command you were using before which is odd showing up as a problem now because as per TOS you have already tested your previous script.

 Respond  
Warriorii   -  Mar 13, 2011

Sorry about that, didn't mean to take out the '#join-part on' when I added the other. but it's back now
thanks for pointing that out to me..

gooshie, I tried that Add/Remove Channel you have above and all i get is .... /write: insufficient parameters. Maybe I did something wrong putting it in
I used a different program though....

 Respond  
gooshie   -  Mar 11, 2011
Add/Remove Channel
.$iif($read(join-part.txt,w,#),Delete,Add) #: {
  var %f join-part.txt
  if !$read(%f,w,#) { echo # # added to %f | write %f # }
  else { echo # # Removed from %f | write -ds $+ # %f }
}
 Respond  
Jethro   -  Mar 11, 2011

I think the #join-part on and #join-part end are missing:

#join-part on
on *:JOIN:#: jp
on *:PART:#: jp
alias -l jp {
  if (!$read(join-part.txt , w ,$chan)) { return }
  .echo $chan $iif($event = join,$jn2,$pt2) $+ 9,1 $nick $iif($event = join,joined,left) $chan at $time(hh:nn tt) on $date(ddd mmm/d/yy)  $+ $iif($event = join,$jn2,$pt2)
}
alias jn return 14,5J15,4OI14,5N
alias jn2 return 14,5T15,4IM14,5E
alias pt return 14,2P15,12AR14,2T
alias pt2 return 14,2T15,12IM14,2E
#join-part end
 Respond  
gooshie   -  Mar 11, 2011

Warriorii
Tbh, I only use groups as a debugging aid. To me, they are almost as bad as a goto jump as the end can be far from the start tag. I also dont care for groups as they are but another file write that I try to avoid for performance sake and even more so now as we enter the era of solid state drives.

 Respond  
Warriorii   -  Mar 11, 2011

ahhh i see what you mean, I'll remember that, that has happened to me in the past.. Thanks

 Respond  
gooshie   -  Mar 11, 2011

Warriorii
Your right, unless you have events under those you wish to exclude.

 Respond  
Warriorii   -  Mar 11, 2011

gooshie why does the #join-part on need #join-part end?? It is either on or off. :)
Jethro_ I'm gonna see if i can implant your code above into the script. thanks buddy

I changed the join and part and used the one u posted and it works great. thanks again buddy you are amazing.....

 Respond  
Jethro   -  Mar 11, 2011

Since the join and part event share the same routine, you can combine them using an alias and the $event:

on *:JOIN:#: jp
on *:PART:#: jp
alias -l jp {
  if (!$read(join-part.txt , w ,$chan)) { return }
  .echo $chan $iif($event = join,$jn2,$pt2) $+ 9,1 $nick $iif($event = join,joined,left) $chan at $time(hh:nn tt) on $date(ddd mmm/d/yy)  $+ $iif($event = join,$jn2,$pt2)
}
 Respond  
gooshie   -  Mar 11, 2011

join-part on <= needs => #join-part end

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.