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.

Request

Old posts that have not been replied to for several years.
Locked
F
FuE-
Halfop
Posts: 57
Joined: Sat Nov 27, 2004 3:46 pm

Request

Post by FuE- »

Hi! i have stuck with a request script.

if a user want to request a bot from mine service.
ex.
!Request [BotName] #Chan
If the chan has more then 25 idlers the bot say in chan
$chan Accepted!
Then the bot join the chan!
if the chan has not 25 idlers he say $chan Has Not 25+ Idlers

but HOW! :cry:
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

set n 25
bind pub m !request req
proc req {n u h c t} {
  set t [split $t]
  if {[llength $t] < 2} return
  if [string compare -nocase $::botnick [lindex $t 0]] return 
  if [info exists ::r] {
    puthelp "privmsg $c :already handling pending request, hold on..."
  } {
    puthelp "privmsg $c :checking [lindex $t 1]..."
    channel add [lindex $t 1]
    set ::r [lindex $t 1]
    set ::ch $c
  }
}
bind raw - 315 eow  ;# End of /WHO list.
proc eow {f k t} {
  if ![info exists ::r] return
  if [string equal -nocase $::r [lindex [split $t] 1]] {
    if {[llength [chanlist $::r]] < $::n} {
      puthelp "privmsg $::ch :channel $::r has less than $::n users, leaving..."
      channel remove $::r
    } {
      puthelp "privmsg $::ch :channel $::r accepted!"
    }
    unset ::r
  }
}
F
FuE-
Halfop
Posts: 57
Joined: Sat Nov 27, 2004 3:46 pm

Post by FuE- »

not work?
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

FuE- wrote:not work?
not error? :roll:
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

lol, give us the error and maybe we can fix it for you? :p
F
FuE-
Halfop
Posts: 57
Joined: Sat Nov 27, 2004 3:46 pm

Post by FuE- »

i write !request #channel http://www.site.com nothing happend
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

FuE- wrote:i write !request #channel http://www.site.com nothing happend
you don't even follow the format of that !request, specified by YOU

get a clue what YOU asked for (hint: it doesn't have anything to do with websites)
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Hi! i have stuck with a request script.

if a user want to request a bot from mine service.
ex.
!Request [BotName] #Chan
i write !request #channel http://www.site.com nothing happend
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

* Alchera falls off his chair
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked