Profesyonel Away Addon
alias awayon {
if ($readini(away.ini,settings,nickchange) == on) {
/nick $readini(away.ini,settings,awaynick)
set %timeaway $time
set %timeaway2 $ctime
/away $readini(away.ini,settings,awayreason) $chr(166) %version
/ame Away: $readini(away.ini,settings,awayreason) $chr(166) %version
}
else {
set %timeaway $time
set %timeaway2 $ctime
/away $readini(away.ini,settings,awayreason) $chr(166) %version
/ame Away: $readini(away.ini,settings,awayreason) $chr(166) %version
}
}
alias awayoff {
if ($readini(away.ini,settings,nickchange) == on) {
/nick $readini(away.ini,settings,normalnick)
/away
/ame Back: Was away: $duration($calc($ctime – %timeaway2)) since %timeaway $+ , reason was: $readini(away.ini,settings,awayreason) $chr(166) %version
}
else {
/away
/ame Back: Was away: $duration($calc($ctime – %timeaway2)) since %timeaway $+ , reason was: $readini(away.ini,settings,awayreason) $chr(166) %version
}
}
on 1:text:*:?: {
if ($away) {
.notice $nick $readini(away.ini,settings,queryreply) $chr(166) %version
}
}
on 1:text:*:#: {
if ($me isin $strip($1-)) {
if ($away) {
.notice $nick $readini(away.ini,settings,chanreply) $chr(166) %version
}
}
}
on 1:text:*:*: {
if ($me isin $strip($1-)) {
if ($away) {
.notice $nick $readini(away.ini,settings,highreply) $chr(166) %version
}
}
}
dialog away {
title “Away system”
size -1 -1 242 226
option dbu
text “BlackWolf script away system”, 1, 77 3 71 8
text “Away nick:”, 2, 6 18 32 8
edit “”, 3, 36 17 73 10, read
button “Change”, 4, 189 15 37 12
edit “”, 5, 112 17 74 10
text “Normal nick:”, 6, 6 31 29 8
edit “”, 7, 36 30 73 10, read
edit “”, 8, 112 30 74 10
button “Change”, 9, 189 29 37 12
box “Nicks”, 10, 4 9 236 59
button “Ok”, 11, 89 210 37 12, ok
box “Replies”, 12, 4 68 236 83
text “Query:”, 13, 7 78 20 9
edit “”, 14, 30 76 203 10, read
edit “”, 15, 7 88 188 10
button “Change”, 16, 196 87 37 12
text “Channel:”, 17, 7 102 25 8
edit “”, 18, 30 100 203 10, read
edit “”, 19, 7 112 188 10
button “Change”, 20, 196 111 37 12
text “Highlight:”, 21, 7 126 25 8
edit “”, 22, 30 124 203 10, read
edit “”, 23, 7 136 188 10
button “Change”, 24, 196 135 37 12
text “Reason:”, 25, 7 155 25 8
edit “”, 26, 30 153 203 10, read
edit “”, 27, 7 165 188 10
button “Change”, 28, 196 164 37 12
button “Away on”, 29, 89 181 37 12
button “Away off”, 30, 128 181 37 12
box “Away info”, 31, 4 175 235 33
text “Away:”, 32, 7 183 25 8
edit “Off”, 33, 38 182 17 10, read
edit “Time”, 34, 38 194 50 10, read
text “Away time:”, 35, 7 195 30 8
box “Change nick”, 36, 6 42 220 23
button “On”, 37, 106 49 25 11
button “Off”, 38, 133 49 25 11
edit “”, 39, 65 49 22 11, read
text “Change nick on away:”, 40, 10 51 54 8
}
on *:dialog:away:init:*:{
set %awayniks $readini(away.ini,settings,awaynick)
set %normalnick $readini(away.ini,settings,normalnick)
set %awayreason $readini(away.ini,settings,awayreason)
set %nickchange $readini(away.ini,settings,nickchange)
.did -ra $dname 3 %awayniks
.did -ra $dname 7 %normalnick
.did -ra $dname 14 %queryreply
.did -ra $dname 18 %chanreply
.did -ra $dname 22 %highreply
.did -ra $dname 26 %awayreason
.did -ra $dname 39 %nickchange
if ($away) {
.did -ra $dname 33 On
.did -ra $dname 34 $duration($calc($ctime – %timeaway2))
}
else {
.did -ra $dname 33 Off
.did -ra $dname 34 Not away
}
}
ON *:DIALOG:away:sclick:4:{
.writeini away.ini settings awaynick $did($dname,5).text
.did -ra $dname 3 $did($dname,5)
.did -r $dname 5
}
ON *:DIALOG:away:sclick:9:{
.writeini away.ini settings normalnick $did($dname,8).text
.did -ra $dname 7 $did($dname,8)
.did -r $dname 8
}
ON *:DIALOG:away:sclick:28:{
.writeini away.ini settings awayreason $did($dname,27).text
.did -ra $dname 26 $did($dname,27)
.did -r $dname 27
}
ON *:DIALOG:away:sclick:29:{
awayon
.did -ra $dname 33 On
.did -ra $dname 34 $duration($calc($ctime – %timeaway2))
}
ON *:DIALOG:away:sclick:30:{
awayoff
.did -ra $dname 33 Off
.did -ra $dname 34 Not away
}
ON *:DIALOG:away:sclick:16:{
.writeini away.ini settings queryreply $did($dname,15).text
set %queryreply $did($dname,15).text
.did -ra $dname 14 $did($dname,15)
.did -r $dname 15
}
ON *:DIALOG:away:sclick:20:{
.writeini away.ini settings chanreply $did($dname,19).text
set %chanreply $did($dname,19).text
.did -ra $dname 18 $did($dname,19)
.did -r $dname 19
}
ON *:DIALOG:away:sclick:24:{
.writeini away.ini settings highreply $did($dname,23).text
set %highreply $did($dname,23).text
.did -ra $dname 22 $did($dname,23)
.did -r $dname 23
}
ON *:DIALOG:away:sclick:37:{
.writeini away.ini settings nickchange On
set %nickchange On
.did -ra $dname 39 On
}
ON *:DIALOG:away:sclick:38:{
.writeini away.ini settings nickchange Off
set %nickchange Off
.did -ra $dname 39 Off
}
menu menubar,status,channel {
Away system:dialog -m away away
}