diff options
Diffstat (limited to 'net-irc/epic4/files/local')
-rw-r--r-- | net-irc/epic4/files/local | 114 |
1 files changed, 109 insertions, 5 deletions
diff --git a/net-irc/epic4/files/local b/net-irc/epic4/files/local index 3e6777bc4395..5621702142b3 100644 --- a/net-irc/epic4/files/local +++ b/net-irc/epic4/files/local @@ -1,3 +1,7 @@ +if (fexist(~/.ircrc) == -1 && fexist(~/.epicrc == -1)) { +# set this if you want logging +# assign win_logdir logs + # uncomment this if you don't want time stamping # timestamp off @@ -15,6 +19,7 @@ bind ^[6 parse_command window swap 6 bind ^[7 parse_command window swap 7 bind ^[8 parse_command window swap 8 bind ^[9 parse_command window swap 9 +bind ^[0 parse_command window swap 10 # *** variable sets *** @@ -24,10 +29,39 @@ set dcc_auto_send_rejects off set dcc_timeout 60 set dcc_sliding_window 1000 set auto_rejoin off +set log_rewrite $log_format($1-) +set mangle_logfiles all set mirc_broken_dcc_resume on set status_format 16,12%T [%R] %=%@%N%*%#%S%H%B%Q%A%C%+%I%O%M%F%L %D +# make sure that our logging directory exists + +if (!(win_logdir == [])) { + @mkdir($win_logdir) +} + + +# create status and msg windows, if necessary + +if (winnam(status) == []) { + window 1 name status level CRAP,PUBLIC,WALLS,WALLOPS,SNOTES,CTCP,USERLOG1,USERLOG2,USERLOG3,USERLOG4 + if (!(win_logdir == [])) { + ^window logfile $win_logdir/status.log log on + } + @ setitem(my_wins 0 blank_item) + @ setitem(my_wins 1 status) +} + +if (winnam(queries) == []) { + window new name queries level msgs,actions,dcc hide + if (!(win_logdir == [])) { + ^window queries logfile $win_logdir/msg.log log on + } + @ setitem(my_wins 2 queries) +} + + # *** aliases *** alias ban { @@ -154,6 +188,26 @@ alias format_idle_time { return ${[$0] % 60} seconds } +alias j jnw + +alias jnw { + @:ref_num = matchitem(my_wins $0)) + + if ( (ref_num < 3) || (winnum($ref_num) == -1) ) { + window new hide + window swap last + if (!(win_logdir == [])) { + ^window logfile $win_logdir/$0.log log on + } + @ setitem(my_wins $winnum(0) $0) + } { + window swap $ref_num + } + //join $* +} + +alias join jnw + alias k { kick $C $* } @@ -163,6 +217,14 @@ alias kb { k $* } +alias log_format { + if ( left(1 $0) == [\(] ) { + return $strftime($time() (%m/%d/%Y %I:%M:%S %P)) $2- + } else { + return $strftime($time() (%m/%d/%Y %I:%M:%S %P)) $0- + } +} + alias memoserv { quote memoserv $* } alias mdop { @@ -227,7 +289,9 @@ alias scan { } { if (n2) { @:num += 2 - } { @:num++ } + } { + @:num++ + } } } } @@ -557,10 +621,36 @@ on ^333 "*" { xecho -w $winchan($1) $ts()$banner Topic set by $2 $strftime($3 %c) } +on ^353 "*" { + xecho -w $winchan($2) + xecho -w $winchan($2) -b 16Users on $2: + fe ($3-) n1 n2 n3 n4 { + xecho -w $winchan($2) 14| 13$[17]n1 $[17]n2 $[17]n3 $[17]n414 | + if (n4) { + @total_nicks += 4 + } { + if (n3) { + @total_nicks += 3 + } { + if (n2) { + @total_nicks += 2 + } { + @total_nicks++ + } + } + } + } +} + +on ^366 "*" { + xecho -w $winchan($1) Total number of users on $1: $total_nicks + xecho -w $winchan($1) + @total_nicks = 0 +} + on ^367 "*" { xecho -w 1 $banner $1 $2 $3 $strftime($4 %c) } - # tabkey.jm: a full-featured tab key module for epic # # written by nsx @@ -607,7 +697,8 @@ on ^367 "*" { # If our fragment does not begin with '#' or '&', nickname completion is # attempted. This matches the word fragment against all nicknames in the # current channel. If no matches are found, we then match the word fragment -# against all nicknames in all other channels we're on. +# against all nicknames in all other channels we're on and nicknames in our +# notify list that are presently online. # # If there was multiple matches for the word fragment, we replace the word # fragment with the common prefix for these matches, if any. We also display @@ -641,6 +732,9 @@ on ^367 "*" { # For each DCC CHAT connection that takes place, we add the other party to # our nickname history. # +# For each notify signon, we add the nickname that signed on to our nickname +# history. +# # Each time a nickname is added to our nickname history, we first remove any # prior occurrences of the nickname that may exist. We then check to see if # our nickname history is at its capacity (10 nicknames). If it is, the oldest @@ -817,9 +911,14 @@ alias nick_complete { if (frag_matches == []) { ^local nick_list - fe ($remw($C $mychannels())) channel { - @push(nick_list $onchannel($channel)) + fe ($remw($C $mychannels())) nick_name { + @push(nick_list $onchannel($nick_name)) + } + + fe ($notify(on)) nick_name { + @push(nick_list $nick_name) } + @:nick_list = uniq($nick_list) @:frag_matches = pattern($word_frag% $nick_list) } @@ -873,6 +972,10 @@ on #^msg 10 "*" { @add_nickname($0) } +on #^notify_signon 10 "*" { + @add_nickname($0) +} + on #^send_dcc_chat 10 "*" { @add_nickname(=$0) } @@ -880,3 +983,4 @@ on #^send_dcc_chat 10 "*" { on #^send_msg 10 "*" { @add_nickname($0) } +} |