Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Alias Asys { Dialog -m Asys Asys }
- dialog Asys {
- title "Away System"
- size -1 -1 172 101
- option dbu
- text "Away Nick", 1, 3 6 50 10
- text "Away Reason", 2, 3 23 50 10
- edit "", 3, 58 6 95 10, autohs
- edit "", 4, 58 23 95 10
- check "Announce Away", 5, 4 37 67 8
- check "Change Nick", 6, 4 48 50 8
- check "Remove +o", 7, 4 60 50 8
- check "Auto Away ", 8, 4 72 50 8
- edit "Minutes", 9, 59 71 44 10
- button "Go Away", 10, 32 85 32 12
- button "Come Back", 11, 70 85 32 12
- button "Done", 12, 108 85 32 12
- }
- On *:Dialog:Asys:*:*:{
- If ($devent == Init) {
- If (%Ann == True) { Did -c $dname 5 }
- If (%NC == True) { Did -c $dname 6 }
- If (%RemStat == True) { Did -c $dname 7 }
- Did -a $dname 3 %Gone.Nick
- Did -a $dname 4 %Gone.Res
- }
- If ($Devent == Sclick) {
- If ($did = 5) {
- If ($Did($Dname,$did).state == 1) { Set %Ann True }
- Else { Set %Ann False }
- }
- If ($did = 6) {
- if ($did($dname,$did).state == 1) { Set %NC True }
- Else { Set %NC False }
- }
- If ($did = 7) {
- If ($did($dname,$did).state == 1) { Set %RemStat True }
- Else { Set %RemState False }
- }
- If ($did = 8) {
- If ($did($dname,$did).state == 1) { Set %AA On | Set %Time.AA $calc($did(9)*60) }
- Else { Set %AA Off | Unset %Time.AA }
- }
- If ($did = 10) {
- Set %Asys.Bnick $Me
- Set %Gone.Nick $did(3)
- Set %Gone.Res $did(4)
- If (%Ann == True) { Amsg 14,1X15-14E15cution i14R15C Away System 14-15 I Am Now Away For 14-15 %Gone.res 14-15 Leaving You All At $Time(hh:nn.ss TT) }
- If (%NC == True) { Nick %Gone.Nick }
- If (%RemState == True) {
- If ($me Isop $Chan) { Mode $Active -o $me }
- }
- Set %Away True
- Away %Gone.Res
- }
- If ($did = 11) {
- If (%Ann == True) { Amsg 14,1X15-14E15cution i14R15C Away System 14-15 I Am Now Back From 14-15 %Gone.res 14-15 Coming Back To You All At $Time(hh:nn.ss TT) 14-15 I Was Gone For $Duration($AwayTime) }
- If (%NC == True) { Nick %Asys.Bnick }
- Set %Away False
- Away
- Unset %Asys.bnick
- }
- If ($did = 12) { Dialog -x $dname $dname }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement