This is an away system. just copy it into a new remotes file.
It has a logging feature. And a Paging Feature. for the paging to work, you need to find a .wav file and rename it to page.wav and place it in your main mIRC dir.
on *:Connect:if (%Away = 1) { Away GoAway }
on *:Load:dialog -m AwaySystem AwaySystem -4
Alias ShortTime Return 15 $+ $Remove($replace($Duration($$1),wks,14w15,wk,14w15,days,14d15,day,14d15,hrs,14h15,hr,14h15,mins,14m15,min,14m15,secs,14s15,sec,14s15),$chr(32))
Alias Away {
if ($1 = GoAway) { Goto Bye }
if ($Away = $False) {
set %RealNick $me
Nick %AwayNick
If ($1 = Quick) { set %Reason Quick Away. }
elseif ($1 != $null) { set %Reason $1- }
:Bye
!Away %Reason
set %AwaySince $CTime
set %Away 1
if (%Silent != 1) { Ame 14is now 3L9eavin3g8. 14Reason8:10(15 $+ %Reason $+ 10) 14Logging8:10(15 $+ $iif(%Logging = 1,Enabled,Disabled) $+ 10) 14Pager8:10(15 $+ $iif(%Pager = 1,Enabled8:15/ctcp $me Page,Disabled) $+ 10) }
.timeraway $+ $NetWork 0 %Interval away.gone
}
elseif ($Away = $True) {
!Away
nick %RealNick
.timeraway $+ $NetWork off
set %Away 0
$iif(%Silent != 1,editbox -s /Ame 14is now 3B9ac3k8. 14Reason8: 10(15 $+ %Reason $+ 10) 14Gone For8:10(15 $+ $ShortTime($Calc($Ctime - %AwaySince)) $+ 10)),halt)
if $Lines($MircDirAwayLog.Ini) > 0) { Away.Log.Show }
}
}
alias Away.Gone if (!%Silent) { Ame 14Is 3A9wa3y8. 14Reason8:10(15 $+ %Reason $+ 10) 14Logging8:10(15 $+ $iif(%Logging = 1,Enabled,Disabled) $+ 10) 14Pager8:10(15 $+ $iif(%Pager = 1,Enabled8:15/ctcp $me Page,Disabled) $+ 10) 14Gone Since8: $TimeLong(%AwaySince) }
alias Away.Log.Show {
window -al30k0S @AwayLog
titlebar @AwayLog Away Log
echo @AwayLog 15Away Log
echo @AwayLog 15Double8-15Click on the 14Nick 15in the right to see what messages they left you8.
var %Temp = 0
while (%Temp != $ReadIni($MircDirAwayLog.Ini,Nicks,Total)) { inc %Temp | Aline -l @AwayLog 15 $+ $ReadIni($MircDirAwayLog.ini,Nicks,%Temp) }
}
alias Away.Timer.Idle {
if (($Away = $False) && (%AutoAway = 1) && ($Idle >= %Idle)) {
Away 14is now 3L9eavin3g8. 14Reason8:10(15 $+ %Reason $+ 10) 14Logging8:10(15 $+ $iif(%Logging = 1,Enabled,Disabled) $+ 10) 14Pager8:10(15 $+ $iif(%Pager = 1,Enabled8:15/ctcp $me Page,Disabled) $+ 10)
set %Reason "Auto8-15Away After $ShortTime(%Idle) 15of inactivity."
set %AwaySince $CTime
.TimerAway $+ $NetWork 0 %Interval Away.Gone
}
}
menu @AwayLog {
dclick: {
clear @AwayLog
Aline @AwayLog 15Away Log
Aline @AwayLog 15Double8-15Click on the 14Nick 15in the right to see what messages they left you8.
var %Temp = 0
Echo @AwayLog $Sline(@AwayLog,1)
while (%Temp != $ReadIni($MircDirAwayLog.Ini,$sline(@AwayLog,1),Times)) {
inc %Temp 1
Echo @AwayLog $AscTime($GetTok($ReadIni($MircDirAwayLog.ini,$SLine(@AwayLog,1),%Temp),1,32),15m8/15d8/15yy 15hh8:15nn8:15ss 14tt) 4-15 $GetTok($ReadIni($MircDirAwayLog.ini,$Sline(@AwayLog,1),%Temp),2-,32)
}
}
Clear Log File:{
if ($?!="Are you Sure?" = $True) {
remini $MircDirAwayLog.Ini Nicks
var %Temp = 0
while (%Temp != $Line(@AwayLog,0,1)) {
inc %Temp 1
remini $MircDirAwayLog.Ini $Line(@AwayLog,%Temp,1))
}
clear -l @AwayLog
clear @AwayLog
Echo @AwayLog 15Away Log
Echo @AwayLog 15Double8-15Click on the 14Nick 15in the right to see what messages they left you8.
}
}
}
alias TimeLong {
if ($1) { var %Date1 = $AscTime($1,dddd mmmm ddoo yyyy) | var %Time = $1 }
else { var %Date1 = $AscTime($CTime,dddd mmmm ddoo yyyy) | var %Time = $CTime }
tokenize 32 %Date1
return 14 $+ $1 $2 $Mid($3,1,2) $+ 15 $+ $Mid($3,3) 14 $+ $4 $AscTime(%Time,15hh14:15nn14:15ss 14tt)
}
on ^*:Text:*:?:{
if (($Away = $True) || (%LogNotAway = 1)) {
if ($Away = $True) { msg $Nick 14I am 3A9wa3y8. 14Reason8: %Reason }
if (%Logging = 1) {
close -m $Nick
if ($ReadIni($MircDirAwayLog.ini,Nicks,Total) = $Null) {
WriteIni $MircDirAwayLog.ini Nicks Total 1
WriteIni $MircDirAwayLog.ini Nicks 1 $Nick
WriteIni $MircDirAwayLog.ini $Nick Times 1
WriteIni $MircDirAwayLog.Ini $Nick 1 $Ctime $strip($1-)
WriteIni $MircDirAwayLog.Ini Nicks TotalMessages 1
msg $Nick 14Your Message has been logged8.
halt
}
var %Temp = 0
While (%Temp != $ReadIni($MircDirAwayLog.ini,Nicks,Total)) {
inc %Temp 1
if ($ReadIni($MircDirAwayLog.Ini,Nicks,%Temp) = $Nick) { Goto There }
}
WriteIni $MircDirAwayLog.Ini Nicks Total $Calc($ReadIni($MircDirAwayLog.ini,Nicks,Total) +1)
WriteIni $MircDirAwayLog.ini Nicks $ReadIni($MircDirAwayLog.ini,Nicks,Total) $Nick
:There
WriteIni $MircDirAwayLog.ini $Nick Times $Calc($ReadIni($MircDirAwayLog.Ini,$Nick,Times) + 1)
WriteIni $MircDirAwayLog.ini $Nick $ReadIni($MircDirAwayLog.Ini,$Nick,Times) $Ctime $Strip($1-)
WriteIni $MircDirAwayLog.Ini Nicks TotalMessages $Calc($Readini($MircDirAwayLog.Ini,Nicks,TotalMessages) + 1)
msg $Nick 14Your message has been Logged8.
halt
}
}
}
on *:Input:*:if ((%KeyPress = 1) && ($Away = $True)) { Away }
dialog -l AwaySystem {
title "Away System"
size -1 -1 487 250
option pixels
box "Main Settings", 1, 8 8 473 100
box "Auto Away", 2, 8 111 223 75
box "Logging", 3, 240 111 240 75
box "", 4, 8 190 473 50
text "Away Nick", 5, 8 21 220 17, right
edit "", 6, 240 21 81 17
text "Interval between display of Away Message", 7, 8 50 220 17, right
edit "", 8, 240 50 81 17
text "Reason for being Away", 9, 8 79 220 17, right
edit "", 10, 240 79 81 17
check "Come back on key press", 11, 330 21 150 17
check "Pager", 12, 330 40 150 17
check "Silent Away", 13, 330 59 150 17
check "Pager while not Away", 14, 330 78 150 17
check "Auto Away", 15, 16 130 150 17
text "Idle time before set Away", 16, 16 160 200 17
edit "", 17, 145 160 81 17
check "Logging", 18, 248 130 150 17
check "Logging while not away", 19, 248 160 150 17
button "Accept Changes", 20, 375 205 100 25, ok
}
on *:dialog:AwaySystem:*:*:{
if ($Devent == init) {
did -ra $Dname 6 %AwayNick
did -ra $Dname 8 %Interval
did -ra $Dname 10 %Reason
did -ra $dname 17 %Idle
if (%KeyPress = 1) { did -c $dname 11 }
if (%Pager = 1) { did -c $dname 12 }
if (%Silent = 1) { did -c $dname 13 }
if (%PageNotAway = 1) { did -c $dname 14 }
if (%AutoAway = 1) { did -c $dname 15 }
if (%Logging = 1) { did -c $dname 18 }
if (%LogNotAway = 1) { did -c $dname 19 }
}
elseif (($devent == sclick) || ($Devent = Close) || ($Did = 20)) {
set %AwayNick $Did($Dname,6).text
set %Interval $Did($Dname,8).text
set %Reason $Did($Dname,10).text
set %Idle $Did($Dname,17).text
set %Keypress $Did($Dname,11).state
set %Pager $did($Dname,12).state
set %Silent $Did($Dname,13).state
set %PageNotAway $Did($Dname,14).state
set %Autoaway $Did($Dname,15).state
set %Logging $Did($Dname,18).state
set %LogNotAway $Did($Dname,19).state
}
elseif ($devent = edit) {
if ($Did = 17) { if ($right($Did($Dname,17).text,1) !isnum) { did -ra $Dname 17 $mid($Did($Dname,17).text,1,$Calc($Len($Did($Dname,17).text) - 1)) } }
if ($Did = 8) { if ($right($Did($Dname,8).text,1) !isnum) { did -ra $Dname 8 $mid($Did($Dname,8).text,1,$Calc($Len($Did($Dname,8).text) - 1)) } }
}
}
menu Menubar,Channel {
-
Away System
.$iif($Away = $True,Come Back,Go Away):Away
.Adjust Settings:dialog -m AwaySystem AwaySystem -4
.Show Message Log < $+ $iif($ReadIni($MircDirAwayLog.Ini,Nicks,TotalMessages) = $Null,0,$ReadIni($MircDirAwayLog.Ini,Nicks,TotalMessages)) $+ $Chr(32) Message $+ $iif($ReadIni($MircDirAwayLog.Ini,Nicks,TotalMessages) = 1,,s) $+ >:Away.Log.Show
}
Ctcp *:Page:*:{
if ((($Away = $True) && (%Pager = 1)) || (%PagNotAway = 1)) { splay -w $MircDirPage.wav }
}