Comments
Join Hawkee
|
Login
Search
in
Code Snippets
Images
Products
Reviews
Forum
Home
Platforms
.NET
C++
Cold Fusion
CSS
Hi5
Java
Javascript
mIRC
MySpace
mySQL
OpenSocial
Perl
PHP
Python
Ruby / Rails
TCL
Images
Recently Liked
Most Liked
Most Comments
Snippets
.NET (6)
C++ (5)
Cold Fusion (1)
CSS (2)
Hi5 (1)
Java (1)
Javascript (15)
mIRC (4,227)
MySpace (2)
mySQL (1)
OpenSocial (2)
Perl (7)
PHP (140)
Python (3)
Ruby / Rails (6)
TCL (20)
Products
Computers (15,168)
Electronics (9,654)
Software (1,342)
Video Games (4,644)
Reviews
Computers (9,902)
Electronics (23,458)
Software (3,039)
Video Games (8,577)
Posts
Latest Likes
Latest Comments
All Activities
Comments
Images
Scripts
Code Snippets
Products
Reviews
Profiles
Forum
username
password
auto login
Home
>
Code Snippets
>
A[z]Rael's Snippets
>
mIRC
A[z]Rael aWaY System v1.0
mIRC Code
+ 0
likes
Like it
Please
Register
to submit score.
Average Score
0.0
Scores Submitted
0
Date Added
Jun 29, 2007
Last Updated
Jun 29, 2007
Tags
away
logger
pager
Introduction
nothing special, a very simple away snippet.
Grab the Code
alias away { if (!$away) { a_save away on | a_save time $ctime | a_save nick $me | if ($left($1,1) == $chr(45)) { if ($left($1,2) != $chr(45)) { a_save pager $iif(p isincs $1,on,off) | a_save multi $iif(m isincs $1,on,$network) | a_save logger $iif(l isincs $1,on,off) | a_save silent $iif(s isincs $1,on,off) | a_save anstat $iif(n isincs $1,on,off) | a_save reason $iif($2- != $null,$2-,afk) } | else { a_save reason $iif($2- != $null,$2-,afk) } } | else { a_save reason $iif($1- != $null,$1-,afk) } | a_set away | if ($a_get(logger) == on) || ($a_get(pager) == on) { $iif($window(@away.log),window -c @away.log) | window -aBhk0s +estxL @away.log } } else { a_save away off | a_set back | if ($a_get(logger) == on) || ($a_get(pager) == on) { if ($window(@away.log)) && ($input(Do you want the messages and pages logged when you were away?,y,View logs?)) { window -a @away.log } } } } alias -l a_get { return $readini(" $+ $script $+ ",settings,$$1) } alias -l a_save { writeini " $+ $script $+ " settings $1 $2- } alias -l a_set { if ($1 isincs away) { if ($a_get(silent) == off) { $iif($a_get(multi) == on,scid -at1) $a_get(mtype) $replace($a_get(amsg),<b>,$chr(2),<u>,$chr(31),<i>,$chr(22),<c>,$chr(3),<logger>,$a_get(logger),<pager>,$a_get(pager),<reason>,$a_get(reason)) } | $iif($a_get(anstat) == on,$iif($a_get(multi) == on,scid -at1) nick $a_get(anick)) | $iif($a_get(multi) == on,scid -at1) .quote away $replace($a_get(reason),$chr(32),$chr(160)) } if ($1 isincs back) { if ($a_get(silent) == off) { $iif($a_get(multi) == on,scid -at1) $a_get(mtype) $replace($a_get(bmsg),<b>,$chr(2),<u>,$chr(31),<i>,$chr(22),<c>,$chr(3),<logger>,$a_get(logger),<pager>,$a_get(pager),<reason>,$a_get(reason),<duration>,$duration($calc($ctime - $a_get(time)))) } | $iif($a_get(anstat) == on,$iif($a_get(multi) == on,scid -at1) nick $a_get(nick)) | $iif($a_get(multi) == on,scid -at1) .quote away } } alias -l mas_combo { if ($$1 == check) { var %mas = 1 | while (%mas <= $gettok($a_get($$2),0,181)) { if ($$3 == $gettok($a_get($$2),%mas,181)) { return $true } | if (%mas == $gettok($a_get($$2),0,181)) && ($$3 != $gettok($a_get($$2),%mas,181)) { return $false } | inc %mas } } | if ($1 == load) { did -r mas_dialog $iif($2 == areasons,3,6) | var %mas = 1 | while (%mas <= $gettok($a_get($2),0,181)) { did -a mas_dialog $iif($2 == areasons,3,6) $gettok($a_get($2),%mas,181)) | inc %mas } } | if ($$1 = line) { var %mas = 1 | while (%mas <= $did(mas_dialog,$$2).lines) { if ($$3 == $did(mas_dialog,$$2,%mas)) { return %mas } | inc %mas } } } alias mas { dialog -m mas_dialog mas_dialog } alias eam { dialog -m eam_dialog eam_dialog } alias -l mas_logwin { if (!$window(@away.log)) { window -aBhk0s +estxL @away.log } } dialog mas_dialog { title "A[z]Rael aWaY System" size -1 -1 131 58 option dbu box "", 1, 1 -2 129 33 text "Away reason :", 2, 5 6 37 8 combo 3, 44 5 60 52, drop edit size button "", 4, 106 5 20 11 check "Away nick :", 5, 5 17 37 10 combo 6, 44 17 60 52, drop edit size button "", 7, 106 17 20 11 box "", 8, 1 29 88 28 check "Pager", 9, 5 34 25 10 check "Logger", 10, 44 34 25 10 check "Silent", 11, 5 45 28 10 check "All networks", 12, 44 45 40 10 button "", 13, 90 32 40 12, ok button "Cancel", 14, 90 45 40 12, cancel } dialog eam_dialog { title "A[z]Rael aWaY System - Message Editor" size -1 -1 200 58 option dbu box "", 1, 1 -2 198 33 text "Away message:", 2, 5 6 39 8, right edit "", 3, 46 5 118 10, autohs button "Preview", 4, 165 5 30 10 text "Back message:", 5, 5 18 39 8, right edit "", 6, 46 17 118 10, autohs button "Preview", 7, 165 17 30 10 box "", 8, 1 29 40 28 radio "/amsg", 9, 7 34 25 10 radio "/ame", 10, 7 45 28 10 box "", 11, 42 29 115 28 text " <reason>", 12, 46 35 40 8 text "<duration>", 13, 46 46 40 8 text "<logger> - logger (on/off)", 14, 82 35 100 8 text "<pager> - pager (on/off)", 15, 82 46 100 8 button "Save", 16, 159 32 40 12, ok button "Cancel", 17, 159 45 40 12, cancel } on *:dialog:mas_dialog:*:*:{ if ($devent == init) { did - $+ $iif($away,b,e) $dname 2,3,4,5,6,7,9,10,11,12 | did -a $dname 13 Set $iif($away,Back,Away) | if ($a_get(anstat) == on) { did -c $dname 5 } | else { did -b $dname 6,7 } | if ($a_get(pager) == on) { did -c $dname 9 } | if ($a_get(logger) == on) { did -c $dname 10 } | if ($a_get(silent) == on) { did -c $dname 11 } | if ($a_get(multi) == on) { did -c $dname 12 } | mas_combo load areasons | mas_combo load anicks if ($mas_combo(check,areasons,$a_get(reason))) { did -c $dname 3 $mas_combo(line,3,$a_get(reason)) | did -a $dname 4 Del } | else { did -a $dname 3 $a_get(reason) | did -c $dname 3 $did($dname,3).lines | did -a $dname 4 Add } | if ($mas_combo(check,anicks,$a_get(anick))) { did -c $dname 6 $mas_combo(line,6,$a_get(anick)) | did -a $dname 7 Del } | else { did -a $dname 6 $a_get(anick) | did -c $dname 6 $did($dname,6).lines | did -a $dname 7 Add } } if ($devent == sclick) { if ($did == 13) { if ($away) { away } | else { if ($did($dname,5).state) { a_save anick $did($dname,6) } | away - $+ $iif($did($dname,5).state,n) $+ $iif($did($dname,9).state,p) $+ $iif($did($dname,10).state,l) $+ $iif($did($dname,11).state,s) $+ $iif($did($dname,12).state,m) $did($dname,3) } } | if ($did == 3) || ($did == 6) { did - $+ $iif($did($dname,$did) != $null,e,b) $dname $calc($did +1) | did -ra $dname $calc($did +1) $iif($mas_combo(check,$iif($did == 3,areasons,anicks),$did($dname,$did)),Del,Add) } | if ($did == 5) { if ($did($dname,$did).state) { did -e $dname 6,7 } | else { did -b $dname 6,7 } } if ($did == 4) || ($did == 7) { if ($did($dname,$did) == del) { a_save $iif($did == 4,areasons,anicks) $remove($a_get($iif($did == 4,areasons,anicks)),$did($dname,$calc($did -1)) $+ $chr(181)) | mas_combo load $iif($did == 4,areasons,anicks) | did -ra $dname $did Del | did -c $dname $iif($did == 4,3,6) 1 } | else { a_save $iif($did == 4,areasons,anicks) $a_get($iif($did == 4,areasons,anicks)) $+ $did($dname,$calc($did -1)) $+ $chr(181) | mas_combo load $iif($did == 4,areasons,anicks) | did -ra $dname $did Del | did -c $dname $iif($did == 4,3,6) $did($dname,$iif($did == 4,3,6)).lines } } } if ($devent == edit) { did - $+ $iif($did($dname,$did) != $null,e,b) $dname $calc($did +1) | did -ra $dname $calc($did +1) $iif($mas_combo(check,$iif($did == 3,areasons,anicks),$did($dname,$did)),Del,Add) } } on *:dialog:eam_dialog:*:*:{ if ($devent == init) { did -c $dname $iif($a_get(mtype) == amsg,9,10) | did -a $dname 3 $replace($a_get(amsg),<b>,$chr(2),<u>,$chr(31),<i>,$chr(22),<c>,$chr(3)) | did -a $dname 6 $replace($a_get(bmsg),<b>,$chr(2),<u>,$chr(31),<i>,$chr(22),<c>,$chr(3)) } if ($devent == sclick) { if ($did == 4) || ($did == 7) { echo $color($iif($did($dname,9).state,own text,action text)) -a $iif($did($dname,9).state,< $+ $me $+ >,$chr(42) $me) $did($dname,$calc($did -1)) } | if ($did == 16) { a_save amsg $replace($did($dname,3),$chr(2),<b>,$chr(31),<u>,$chr(22),<i>,$chr(3),<c>) | a_save bmsg $replace($did($dname,6),$chr(2),<b>,$chr(31),<u>,$chr(22),<i>,$chr(3),<c>) | a_save mtype $iif($did($dname,9).state,amsg,ame) } } } on *:connect:{ if ($a_get(away) == on) { if ($a_get(multi) == on) { .quote away $a_get(reason) | $iif($a_get(anstat) == on,nick $a_get(anick)) } | elseif ($a_get(multi) == $network) { .quote away $a_get(reason) | $iif($a_get(anstat) == on,nick $a_get(anick)) } } } on *:load:{ echo 1 -a * A[z]Rael aWaY System loaded... | echo 1 -a * A[z]Rael aWaY System is written by A[z]Rael Email: azrael_korval@yahoo.com } on *:unload:{ echo 1 -a * A[z]Rael aWaY System unloaded... | echo 1 -a * A[z]Rael aWaY System was written by A[z]Rael Email: azrael_korval@yahoo.com } on *:exit:{ a_save away off } on *:text:*:#:{ if ($a_get(logger) == on) && ($a_get(away) == on) { mas_logwin | if ($me isin $1-) || ($a_get(nick) isin $1-) || ($a_get(anick) isin $1-) { if ($a_get(multi) == on) { aline $color(Nick text) @away.log $timestamp < $+ $nick $+ > $1- ( $+ $chan $+ @ $+ $network $+ ) } | elseif ($a_get(multi) == $network) { aline $color(Nick text) @away.log $timestamp < $+ $nick $+ > $1- ( $+ $chan $+ ) } } } } on *:text:*:?:{ if ($a_get(logger) == on) && ($a_get(away) == on) { mas_logwin | if ($a_get(multi) == on) { aline $color(Nick text) @away.log $timestamp < $+ $nick $+ > $1- (PMSG@ $+ $network $+ ) } | elseif ($a_get(multi) == $network) { aline $color(Nick text) @away.log $timestamp < $+ $nick $+ > $1- (PMSG) } } } on *:action:*:#:{ if ($a_get(logger) == on) && ($a_get(away) == on) { mas_logwin | if ($me isin $1-) || ($a_get(nick) isin $1-) || ($a_get(anick) isin $1-) { if ($a_get(multi) == on) { aline $color(Nick text) @away.log $timestamp * $nick $1- ( $+ $chan $+ @ $+ $network $+ ) } | elseif ($a_get(multi) == $network) { aline $color(Nick text) @away.log $timestamp * $nick $1- ( $+ $chan $+ ) } } } } on *:action:*:?:{ if ($a_get(logger) == on) && ($a_get(away) == on) { mas_logwin | if ($a_get(multi) == on) { aline $color(Nick text) @away.log $timestamp * $nick $1- (PMSG@ $+ $network $+ ) } | elseif ($a_get(multi) == $network) { aline $color(Nick text) @away.log $timestamp * $nick $1- (PMSG) } } } on *:notice:*:*:{ if ($a_get(logger) == on) && ($a_get(away) == on) && ($nick !iswm *Serv) { mas_logwin | if ($a_get(multi) == on) { aline $color(Notice text) @away.log $timestamp - $+ $nick $+ - $1- ( $+ $network $+ ) } | elseif ($a_get(multi) == $network) { aline $color(Notice text) @away.log $timestamp - $+ $nick $+ - $1- } } } ctcp *:page:*:{ if ($a_get(pager) == on) && ($a_get(away) == on) { mas_logwin | if ($a_get(multi) == on) { aline $color(Ctcp text) @away.log $timestamp [ $+ $nick PAGE] $1- ( $+ $network $+ ) } | elseif ($a_get(multi) == $network) { aline $color(Ctcp text) @away.log $timestamp [ $+ $nick PAGE] $1- } } } menu channel,status,query { - Set $iif($away,Back,Away) { mas } - } menu menubar { - A[z]Rael aWaY System .Set $iif($away,Back,Away) { mas } .- .Message Editor:{ eam } .Unload:{ unload -rs " $+ $script $+ " } }
Comments
(0)
RSS
Go to Bottom
Enter comment here..
Please
Register
or
Login
to start posting comments.
A[z]Rael
Musician/Veteranarian/Contractor
Last seen:
Nov 08, 2007
Profile
Friends
(2)
Snippets
(1)
Images
(1)
Comments Submitted
(1)
My Snippet Tags
away
logger
pager
Contact
Add to Friends
Send Private Message
MSN:
lokiisagod@hotmail.com
Friends (2)
GuardianDemon
Chase
View All
Sponsors