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.

help with scripting

Old posts that have not been replied to for several years.
Locked
S
Snutte
Voice
Posts: 5
Joined: Tue Dec 07, 2004 2:30 pm

help with scripting

Post by Snutte »

Want a script in my eggdrop that does this:
When, let us say "Santa" is online and someone writes "!radio" the eggdrop says:
"(Adress) Radio is Online"
But if "Santa" is offline the eggdrop says this:
"(Adress) Radio is Offline"

Is there a easy way to do this? Or do you any scrpt that do this?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

who is Santa? :)

a user on bot's userlist? or simply a nick on IRC? (in the latter case there is no need of script at all, just type /whois santa)
S
Snutte
Voice
Posts: 5
Joined: Tue Dec 07, 2004 2:30 pm

Post by Snutte »

demond wrote:who is Santa? :)

a user on bot's userlist? or simply a nick on IRC? (in the latter case there is no need of script at all, just type /whois santa)
just picked first thing on my mind :P

The user is both on irc and in the userfile
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind pub - !ison isonline
proc isonline {n u h c t} {
  if {[set who [hand2nick $t]] != ""} {
    puthelp "privmsg $c :$t is online with nick $who!"
  } {
    puthelp "privmsg $c :$t is offline..."
  }
}
S
Snutte
Voice
Posts: 5
Joined: Tue Dec 07, 2004 2:30 pm

Post by Snutte »

demond wrote:

Code: Select all

bind pub - !ison isonline
proc isonline {n u h c t} {
  if {[set who [hand2nick $t]] != ""} {
    puthelp "privmsg $c :$t is online with nick $who!"
  } {
    puthelp "privmsg $c :$t is offline..."
  }
}
I think I explained pretty bad...sorry..

A user in the channel is sendig radio when he is online...this "Santa"...but the radio is only running when he is online. That's what I need the script for. The script is gonna check if "Santa" is online when someone writes "!Radio"
and answer with:
"(adress to the radio) Radio is Online"
and if "Santa" is offline the eggdrop is gonna say:
"(adress to the radio) Radio is Offline"
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind pub - !radio isonline
proc isonline {n u h c t} {
  if {[set who [hand2nick Santa]] != ""} {
    puthelp "privmsg $c :(adress to the radio) Radio is Online"
  } {
    puthelp "privmsg $c :(adress to the radio) Radio is Offline"
  }
} 
S
Snutte
Voice
Posts: 5
Joined: Tue Dec 07, 2004 2:30 pm

Post by Snutte »

demond

thanx =) *hugs*
Locked