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.

invite script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Locked
n
neilpkemp
Voice
Posts: 21
Joined: Sun Nov 13, 2005 10:52 am

invite script

Post by neilpkemp »

hi

i need a script that will invite someone when they say a certain word

ie - !help (bot invites them into a channel)

would also be useful if i could change the channel the bot invites them to

ie - !helpchan <#chan>

thanks

Neil
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

setudef flag helpchan

bind pub - !help help
bind pub n !helpchan helpchan

proc help {nick uhost hand chan arg} {
 foreach c [channels] {
  if {[channel get $c helpchan]} {
   set hc $c ; break
  }
 }
 if {![info exists hc]} {
  puthelp "privmsg $chan :no help channel available."
 } elseif {[botisop $hc]} {
  puthelp "INVITE $nick $hc"
 }
}

proc helpchan {nick uhost hand chan arg} {
 set c [lindex [split $arg] 0]
 if {![validchan $c]} {
  puthelp "notice $nick :$c is an invalid channel."
 } {
  if {[channel get $c helpchan]} {
   puthelp "notice $nick :$c is already the helpchan."
  } {
   foreach ch [channels] {
    if {[channel get $ch helpchan]} {
     channel set $ch -helpchan
    }
   }
   channel set $c +helpchan
   puthelp "notice $nick :$c is now the help channel."
  }
 }
}
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

sirfz your enthusiasm to satisfy even the dumbest script requests never ceases to amaze me

am I the only one here who thinks we should point out to people like that guy why is their request dumb as it is and how to possibly rethink it in order to get the real job done, instead of simply feed them with scripts that accomplish nothing?

and no, don't tell me you wonder why is inviting by public command issued on a public channel dumb
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
n
neilpkemp
Voice
Posts: 21
Joined: Sun Nov 13, 2005 10:52 am

Post by neilpkemp »

why is it dumb? this is a script request forum and tonight ill put this code on my eggdrop and it will be used,so whats ya problem?


oh and thank you Sir_Fz for having a go,most appreicated
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

because there is no point of keeping a channel invite-only if anyone can get him/herself invited there with a simple public command on a channel everyone has access to

and if the channel you are inviting to is not kept invite-only, the whole thing becomes even more dumb
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
n
neilpkemp
Voice
Posts: 21
Joined: Sun Nov 13, 2005 10:52 am

Post by neilpkemp »

but everyone dont have access to the "channel everyone has access to" only certain times will the bot be used to invite people,no offence but unless you know exactly why i wanted this script and what were using it for then you can tell me its dumb but otherwise keep ya nose out
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

if the channel you are inviting from is restricted, there is no point of inviting in the first place - you should use the same access mechanism for the channel you are inviting to, e.g. channel key
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
n
neilpkemp
Voice
Posts: 21
Joined: Sun Nov 13, 2005 10:52 am

Post by neilpkemp »

i give up

thxs Sir_Fz works a treat :)
Locked