mIRC Home    About    Download    Register    News    Help

Print Thread
#4252 31/12/02 05:13 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
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
  }
}

#4253 31/12/02 09:57 PM
Joined: Dec 2002
Posts: 1,321
H
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
#4254 01/01/03 04:33 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Thanks.. smirk

#4255 01/01/03 05:44 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
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

#4256 02/01/03 04:52 AM
Joined: Dec 2002
Posts: 1,321
H
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

Link Copied to Clipboard