mIRC Home    About    Download    Register    News    Help

Print Thread
Away System #4252 31/12/02 05:13 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
Ok, it there somthing wrong here? because when i set my self away it dont set %awaynick on all networks ant the same whit %reason .. but when i set my self back it shows the %reason at all networks! i can't find any "error"..

Code:
 
; Away System:
/awy {
  if $1- == $null { 
    echo.grey You need to set an away reason.
    halt
  }
  else {
    set %reason $1-
    set %away on
    set %oldnick $me
    set %awaytime $time ( $+ $date $+ )
    if %public == on {
      if %scon-at1 == on {
        scon -at1 away %reason
      }
      else {
        away %reason
      }
      if %scon-atl == on {
        scon -atl nick %awaynick
      }
      else {
        nick %awaynick
      }
      if %scon-atl == on {
        scon -atl ame is away " $+ %reason $+ "
      }
      else {
        ame is away " $+ %reason $+ "
      }
    }
    echo.grey * You have been marked as being away, press F3 to get back!
    titlebar - The Reactor Script - %name - Away " $+ %reason $+ "
  }
}



; Set Back:
/back {
  if (%away == on) {
    echo.grey * Away turned off
    titlebar - The Reactor Script - %name
    set %away off

    if %scon-at1 == on {
      scon -at1 /nick %oldnick
    }
    else {
      nick %oldnick
    }
    if %public == on {
      if $awaytime == 0 {
        if %scon-at1 == on {
          scon -at1 ame is back from, " $+ %reason $+ "
        }
        else {
          ame is back from, " $+ %reason $+ "
        }
      }
      else {
        if %scon-at1 == on {
          scon -at1 ame is back from, " $+ %reason $+ " [awaytime: $duration($awaytime) $+ ]
        }
        else {
          ame is back from, " $+ %reason $+ " [awaytime: $duration($awaytime) $+ ]
        }
      }
    }
    unset %oldnick
    unset %awaytime
    unset %reason
    away
  }
}

Re: Away System #4253 31/12/02 09:57 PM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Code:

; Away System:
awy {
  if (!$1-) echo.grey You need to set an away reason.
  else {
    set %_away 1
    set %_away.reason $1-
    set %_away.oldnick $me
    $iif(%scon-at1 == on,scon -at1) away %_away.reason
    $iif(%scon-at1 == on,scon -atl) nick %awaynick
    if (%public == on) $iif(%scon-at1 == on,scon -atl) ame is away " $+ %reason $+ "
    echo.grey * You have been marked as being away, press F3 to get back!
    titlebar - The Reactor Script - %name - Away $+(",%_away.reason,")
  }
}
  
; Set Back:
back {
  if (!%_away) echo.grey * You are not away!
  else {
    $iif(%scon-at1 == on,scon -at1) nick %_away.oldnick
    $iif(%scon-at1 == on,scon -at1) away
    if (%public == on) $iif(%scon-at1 == on,scon -at1) ame $+(is back from ",%_away.reason," [awaytime: $duration($awaytime),])
    echo.grey * Away turned off
    titlebar - The Reactor Script - %name
    unset %_away*
  }
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: Away System #4254 01/01/03 04:33 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
Thanks.. smirk

Re: Away System #4255 01/01/03 05:44 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
hmm, somthing is wrong whit the "awaytime".. help.. :P

[18:43:46] * Deep3D is away "test2k"
[18:43:46] * You have been marked as being away, press F3 to get back!
[18:43:48] * Deep3D is now known as deep-a
[18:43:56] * deep-a is back from "test2k" [awaytime: 0secs]
[18:43:56] * Away turned off
[18:43:56] * deep-a is now known as Deep3D

Re: Away System #4256 02/01/03 04:52 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
That is because I moved /away to the top. Here's the fixed version.[color:#003300]
Code:

; Set Back:
back {
  if (!%_away) echo.grey * You are not away!
  else {
    if (%public == on) $iif(%scon-at1 == on,scon -at1) ame $+(is back from ",%_away.reason," [awaytime: $duration($awaytime),])
    echo.grey * Away turned off
    titlebar - The Reactor Script - %name
    $iif(%scon-at1 == on,scon -at1) nick %_away.oldnick
    $iif(%scon-at1 == on,scon -at1) away
    unset %_away*
  }
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C