- Home»
- Cod sursa: UltraAwaySystem
UltraAwaySystem
UltraAwaySystem
Away mirc snippet code if you dont like mirc dialogs. You can set away/back from command or from menu channel. Please note that you need to configure ini file in order to store the settings.
| Postat de | Copyright | Categorie | Review user | Vizualizari | Data |
|---|---|---|---|---|---|
| BLKoldSUN | ch1zra | activity | Cod testat | 297 | 2024-08-11 09:44:16 |
on 1:load: {
if ($version > 6.0) {
echo -s $+ $color(info) $+ [UltraAwaySystem] by ch1zra succesfully loaded
echo -s $+ $color(info) $+ [UltraAwaySystem] 4ch1zra@gmail.com
echo -s $+ $color(info) $+ [UltraAwaySystem] Now please take some time to setup the Ultra Away System.
echo -s $+ $color(info) $+ [UltraAwaySystem] If you eer want to dify the settings, just type 4/setupaway
setupaway
}
else {
echo Version 6.0 or higher required, get a newer version of mirc at http://www.mirc.com/get.html
unload -rs $script
}
}
on *:input:*: {
if ($away == $false) && ($readini(AwaySystem.ini,Settings,AutoAway) == 1) {
%%awch1zraAT = $calc($readini(AwaySystem.ini,Settings,AutoAwayTime) * 60)
.timerAutoAway $+ $network -i 1 %%awch1zraAT autoaway
}
if (/away == $1) {
if ($2- == $null) {
nick $remove($me,$readini(AwaySystem.ini,Settings,Tag))
var %at $duration($calc($ctime - %awch1zratimw))
ame is [back] from : $chr(91) $+ %awch1zrar $+ $chr(93) after $chr(91) $+ %at $+ $chr(93)
if ($timer(ch1away $+ $network)) .timerch1away $+ $network off
unset %awch1zra*
}
else {
%awch1zrar = $2-
%awch1zranick = $me
%awch1zratimw = $ctime
nick $me $+ $readini(AwaySystem.ini,Settings,Tag)
ame is away. Reason : 4 $+ %awch1zrar
if ($readini(AwaySystem.ini,Settings,SayEvery) == 1) {
%tme = $calc($readini(AwaySystem.ini,Settings,SayEveryTime) * 60)
.timerch1away $+ $network -i 0 %tme ame is AwaY. [Reason] : 4 $+ %awch1zrar
}
}
}
}
on *:OPEN:?:*: {
if ($away == $true) {
notice $nick -[ Automated msg ]- I'm AwaY... sorry...
}
}
alias setupaway {
var %tag $$input(Enter AwaY TAG,e,Away Tag)
if (%tag != $null) {
writeini AwaySystem.ini Settings Tag %tag
echo -s [UltraAwaySystem] Tag set to $+ $color(info) %tag $+ .
}
if ($$input(Do you want do enable auto away ?,y,AutoAway) == $true) {
writeini AwaySystem.ini Settings AutoAway 1
echo -s [UltraAwaySystem] AutoAWay $+ $color(info) Enabled.
var %at $$input(Enter time in minutes for auto away?,e,AutoAway Time)
if (%at isnum) {
writeini AwaySystem.ini Settings AutoAwayTime %at
echo -s [UltraAwaySystem] AutoAway Time Set to $+ $color(info) %at minute(s).
}
else {
echo -s $+ $color(info) $+ [UltraAwaySystem] AutoAway Time not set ! Run Setup again and enter pure numeric value !
return
}
}
else writeini AwaySystem.ini Settings AutoAway 0
if ($$input(Enable Say Every X minutes your away status?,y,Say Every Setup) == $true) {
writeini AwaySystem.ini Settings SayEvery 1
var %st $$input(Enter time in minutes for Say Every,e,SayEvery Time)
if (%st isnum) {
writeini AwaySystem.ini Settings SayEveryTime %st
echo -s [UltraAwaySystem] AutoAway Time Set to $+ $color(info) %st minute(s).
}
else {
echo -s $+ $color(info) $+ [UltraAwaySystem] AutoAway Time not set ! Run Setup again and enter pure numeric value !
return
}
}
else writeini AwaySystem.ini Settings SayEvery 0
echo -s $+ $color(info) $+ [UltraAwaySystem] Setup Completed.
}
alias -l autoaway {
away AutO AwaY after $duration(%%awch1zraAT)
%awch1zrar = AutO AwaY after $duration(%%awch1zraAT)
%awch1zranick = $me
%awch1zratimw = $ctime
nick $me $+ $readini(AwaySystem.ini,Settings,Tag)
ame is away. Reason : 4 $+ %awch1zrar
if ($readini(AwaySystem.ini,Settings,SayEvery) == 1) {
var %tme $calc($readini(AwaySystem.ini,Settings,SayEveryTime) * 60)
.timerch1away $+ $network -i 0 %tme ame is AwaY. [Reason] : 4 $+ %awch1zrar
}
}
menu menubar {
UltraAwaySystem
.Setup:setupaway
.Unload
..Yes I'm sure:echo -s $+ $color(info) $+ [UltraAwaySystem] Unloaded... | unload -rs $script | .remove AwaySystem.ini
}
IRC Snippets