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.

setudef

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
abah
Halfop
Posts: 72
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

setudef

Post by abah »

if i want to put setudef here can anyone help me install it ?

Code: Select all

bind pub -|- !ison ison:nick
proc ison:nick {nick host hand chan arg} {
  global ison botnick ison_infonick
  set ison(rchan) "$chan"
  set isoninfonick [lindex [split $arg] 0]
  if {$isoninfonick == ""} {
    putquick "NOTICE $nick :Syntax: !ison <Nick>"
    return 0
   }
   bind raw -|- 303 isonnick:isonline
   set ison_infonick "$isoninfonick"
   putquick "PRIVMSG $ison(rchan) :Please wait..."
   putquick "ISON $ison_infonick"
   return 0
  }

proc isonnick:isonline {from keyword arg} {
  global ison ison_infonick botnick
  if {([string match "*$ison_infonick*" $arg])} {
   putserv "PRIVMSG $ison(rchan) :$ison_infonick is online!"
   unbind raw -|- 303 isonnick:isonline
      return 0
    } else {
      putserv "PRIVMSG $ison(rchan) :$ison_infonick is offline!"
      unbind raw -|- 303 isonnick:isonline
      return 0
    }
  }
abah - Kota Makassar - Indonesia
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: setudef

Post by willyw »

For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
User avatar
abah
Halfop
Posts: 72
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: setudef

Post by abah »

willyw wrote: Sun Nov 24, 2024 9:01 am Check out:

viewtopic.php?p=98054#p98054

Code: Select all

bind pub -|- !ison ison:nick

setudef flag status
if {([lsearch -exact [channel info $chan] {+status}] != -1)}  {

proc ison:nick {nick host hand chan arg} {
  global ison botnick ison_infonick
  set ison(rchan) "$chan"
  set isoninfonick [lindex [split $arg] 0]
  if {$isoninfonick == ""} {
    putquick "NOTICE $nick :Syntax: !ison <Nick>"
    return 0
   }
   bind raw -|- 303 isonnick:isonline
   set ison_infonick "$isoninfonick"
   putquick "PRIVMSG $ison(rchan) :Please wait..."
   putquick "ISON $ison_infonick"
   return 0
  }

proc isonnick:isonline {from keyword arg} {
  global ison ison_infonick botnick
  if {([string match "*$ison_infonick*" $arg])} {
   putserv "PRIVMSG $ison(rchan) :$ison_infonick is online!"
   unbind raw -|- 303 isonnick:isonline
      return 0
    } else {
      putserv "PRIVMSG $ison(rchan) :$ison_infonick is offline!"
      unbind raw -|- 303 isonnick:isonline
      return 0
    }
  }
  }
i am right ?
abah - Kota Makassar - Indonesia
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Re: setudef

Post by simo »

Code: Select all


bind pub -|- !ison ison:nick

setudef flag status


proc ison:nick {nick host hand chan arg} {
   if {![channel get $chan status]} { return 0 }

  global ison botnick ison_infonick
  set ison(rchan) "$chan"
  set isoninfonick [lindex [split $arg] 0]
  if {$isoninfonick == ""} {
    putquick "NOTICE $nick :Syntax: !ison <Nick>"
    return 0
   }
   bind raw -|- 303 isonnick:isonline
   set ison_infonick "$isoninfonick"
   putquick "PRIVMSG $ison(rchan) :Please wait..."
   putquick "ISON $ison_infonick"
   return 0
  }


proc isonnick:isonline {from keyword arg} {
  global ison ison_infonick botnick
  if {([string match "*$ison_infonick*" $arg])} {
   putserv "PRIVMSG $ison(rchan) :$ison_infonick is online!"
   unbind raw -|- 303 isonnick:isonline
      return 0
    } else {
      putserv "PRIVMSG $ison(rchan) :$ison_infonick is offline!"
      unbind raw -|- 303 isonnick:isonline
      return 0
    }
  }
  
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: setudef

Post by willyw »

abah wrote: Mon Nov 25, 2024 6:23 am ...
i am right ?
While I did post in that old thread, I like the method posted by Mysticales better. :)
I believe that the link that I posted in this thread above, went directly to Mysticales post. I meant to, anyway.

See the post in this thread by simo .

Then, the real answer to this last question from you, will be answered when you try it. :)

Let us know how it goes.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
User avatar
abah
Halfop
Posts: 72
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: setudef

Post by abah »

simo wrote: Mon Nov 25, 2024 8:52 am

Code: Select all


bind pub -|- !ison ison:nick

setudef flag status


proc ison:nick {nick host hand chan arg} {
   if {![channel get $chan status]} { return 0 }

  global ison botnick ison_infonick
  set ison(rchan) "$chan"
  set isoninfonick [lindex [split $arg] 0]
  if {$isoninfonick == ""} {
    putquick "NOTICE $nick :Syntax: !ison <Nick>"
    return 0
   }
   bind raw -|- 303 isonnick:isonline
   set ison_infonick "$isoninfonick"
   putquick "PRIVMSG $ison(rchan) :Please wait..."
   putquick "ISON $ison_infonick"
   return 0
  }


proc isonnick:isonline {from keyword arg} {
  global ison ison_infonick botnick
  if {([string match "*$ison_infonick*" $arg])} {
   putserv "PRIVMSG $ison(rchan) :$ison_infonick is online!"
   unbind raw -|- 303 isonnick:isonline
      return 0
    } else {
      putserv "PRIVMSG $ison(rchan) :$ison_infonick is offline!"
      unbind raw -|- 303 isonnick:isonline
      return 0
    }
  }
  
thanks working very well anda thanks @willy
abah - Kota Makassar - Indonesia
Post Reply