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 please

Old posts that have not been replied to for several years.
Locked
S
SeLEct

help please

Post by SeLEct »

Hi all
i need a script like when type !request [channel]
the bot join the channel look if it is at least 15 people in the chan the bot stay in the chan If it's not at least 15 it left the channel


When/if the bot accept the channel it pm me owner and say Request accepted [channel] the requester wait for chan owner access

Plzz help me with a working script like that :D
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Try this, left some things for you to fix yourself :mrgreen:

Code: Select all

bind pub - !request request:channel
proc request:channel {nick host hand chan arg} {
  #add some tests here to check if the input is a channelname
  putserv "JOIN [lindex [split $arg] 0]"
  utimer 5 [list check:howmany [lindex [split $arg] 0]]
}

proc check:howmany {chan} {
  if {[llength [chanlist $chan]] < 15} {
    putserv "PART $chan"
  } else {
    #add modes to the next line
    channel add $chan
    #add a line to send a msg to the owner here
  }
}
Elen sila lúmenn' omentielvo
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

you can't use utimer for this, the bot will immidiatly part the channel after joining (depends on the settings in the conf file, and its does that by default).
this one's better:

Code: Select all

bind pub n !request request:chan
bind join - * valid:chan

proc request:chan {nick host hand chan arg} {
global request
if {"[lindex [split $arg] 0]" != "" && [string match "#*" [lindex $arg 0]]} {
 channel add [lindex [split $arg] 0]
 set request([string tolower [lindex [split $arg] 0]]) 1
 }
}

proc valid:chan {nick host hand chan} {
global request
if {$nick == $::botnick && [info exists request([string tolower $chan])]} {
 if {[llength [chanlist $chan]] < 15} {
 channel remove $chan
 unset request([string tolower $chan])
} else {
 unset request([string tolower $chan])
  }
 }
}
S
SeLEct

hmm oki thats good

Post by SeLEct »

The bot join but when i try to .-chan [channel] the bot says i am not on thats channel why?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

which script are you talking about ? and why would you want to do .-chan #channel, the bot will part if it finds that the channel has less than 15 users.
S
SeLEct

No

Post by SeLEct »

the bots not parting
S
SeLEct

Post by SeLEct »

when the bot join the channel in dcc it say

[11:21] <<hurdoss>> !SeLEct--! !request #hmmmmm
[11:21] Tcl error [join:peak]: invalid channel: #hmmmmm


plzz help why
sir_fz this is error msg fron you script

when the bot join is only one op it don't part
in the channel the bot not ansvar for commands like !cigarette a LOL toolz script and it don't see me or it's a verry big problem plzzz help me
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

SeLEct wrote:[11:21] Tcl error [join:peak]: invalid channel: #hmmmmm
i dont see proc "join:peak" in any of the above scripts. you must have changed something. maybe you could post this proc?
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked