mIRC Home    About    Download    Register    News    Help

Print Thread
#200310 02/06/08 08:42 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
how can i make a script log all join events in a specified channel then in every 5 joins i will rejoin that channel

on every rejoin i make, it also logs the time i rejoined the channel...

anyone can help me?

Last edited by sigbin; 02/06/08 08:44 AM.
sigbin #200312 02/06/08 04:32 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
im not sure if this is what you want

on *:JOIN:#specificchannel:{
if (%vc > 5) { hop | unset %vc }
else {
.write log.txt $nick Joined # | inc %vc
}
}

on ME:*:JOIN:#specificchannel:{ .write log.txt I have joined # at $time(HH:nn) }


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #200317 02/06/08 11:48 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'd recommend putting the ON ME:*:JOIN event before the ON *:JOIN event, since the format of the first event, according to Lpfix5's code will trigger no matter who joins, preventing the 2nd event from triggering if you join. Although switching them, without a re-code, also means that your join, due to the hop, would not be counted.

Additionally, please note that using the hop command quickly, as would be the case if a lot of people joined the channel in a very short amount of time (eg: due to a net split), can cause network/server problems by trying to have you rejoin the channel too quickly.

sigbin #200322 03/06/08 03:51 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
A little rewrite so it's a single on JOIN event and so that you won't have issues rejoining multiple times after a netsplit. Also adjusted the counter as it was going to rejoin every 6 times instead of 5.

Code:
on *:JOIN:#specificchannel:{ 
  if ($nick == $me) { .write log.txt I have joined $chan at $time(HH:nn) | return }
  if (%vc >= 5) { .timerReJoin 1 1 hop | unset %vc }
  else {
    .write log.txt $nick Joined $chan
    inc %vc
  }
}


Invision Support
#Invision on irc.irchighway.net
Riamus2 #200331 03/06/08 12:36 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz everyone...

but how about if i want to save the log.txt in a certain folder and on the filename of the txt file ill include the date... like "mm/dd log.txt" filename and it will be saved in a folder within the mirc folder...

so meaning different log files for the different day... can it be posibble?

Last edited by sigbin; 03/06/08 12:43 PM.
sigbin #200332 03/06/08 01:00 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: sigbin
thankz everyone...

but how about if i want to save the log.txt in a certain folder and on the filename of the txt file ill include the date... like "mm/dd log.txt" filename and it will be saved in a folder within the mirc folder...

so meaning different log files for the different day... can it be posibble?


.write $+($date(mm-dd),-,log.txt) data


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Link Copied to Clipboard