This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Away script for users

Old posts that have not been replied to for several years.
Locked
M
MaTt

Away script for users

Post by MaTt »

hello

i am looking for a script where users can say that they are away for some time with a cmd like !away.
can some1 help me out with this ?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well, this is quite simple.

You would need a bind on the command "!away"
and a procedure to call it.

Umm, here try this.

Code: Select all

### You can define the user flag in the bind yourself
#### (n: owner), (m: master), (o: op), (-: public)
bind pub n !away display:away

proc display:away {nick uhost hand chan text} {
  putserv "PRIVMSG $chan :I am away since [expr [rand 200]] hrs, [expr [rand 59]] mins and [expr [rand 59]] secs."
  return 0
}

If you want to display it in a /me (ACTION) you can replace:

Code: Select all

  putserv "PRIVMSG $chan :I am away since [expr [rand 200]] hrs, [expr [rand 59]] mins and [expr [rand 59]] secs."

with this:

Code: Select all

  putserv "PRIVMSG $chan :\001ACTION I am away since [expr [rand 200]] hrs, [expr [rand 59]] mins and [expr [rand 59]] secs.\001"


For the example I set the away time in a format like X hrs, X mins and X secs, where X are random generated numbers by the bot.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked