| View previous topic :: View next topic |
| Author |
Message |
neilpkemp Voice
Joined: 13 Nov 2005 Posts: 21
|
Posted: Wed May 10, 2006 2:34 pm Post subject: invite script |
|
|
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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed May 10, 2006 7:09 pm Post subject: |
|
|
| Code: | 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."
}
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed May 10, 2006 11:21 pm Post subject: |
|
|
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] tag when posting logs, code |
|
| Back to top |
|
 |
neilpkemp Voice
Joined: 13 Nov 2005 Posts: 21
|
Posted: Thu May 11, 2006 2:51 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu May 11, 2006 3:14 am Post subject: |
|
|
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] tag when posting logs, code |
|
| Back to top |
|
 |
neilpkemp Voice
Joined: 13 Nov 2005 Posts: 21
|
Posted: Thu May 11, 2006 11:51 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu May 11, 2006 12:36 pm Post subject: |
|
|
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] tag when posting logs, code |
|
| Back to top |
|
 |
neilpkemp Voice
Joined: 13 Nov 2005 Posts: 21
|
Posted: Thu May 11, 2006 1:56 pm Post subject: |
|
|
i give up
thxs Sir_Fz works a treat  |
|
| Back to top |
|
 |
|