egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

invite script

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
neilpkemp
Voice


Joined: 13 Nov 2005
Posts: 21

PostPosted: Wed May 10, 2006 2:34 pm    Post subject: invite script Reply with quote

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
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed May 10, 2006 7:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed May 10, 2006 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
neilpkemp
Voice


Joined: 13 Nov 2005
Posts: 21

PostPosted: Thu May 11, 2006 2:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu May 11, 2006 3:14 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
neilpkemp
Voice


Joined: 13 Nov 2005
Posts: 21

PostPosted: Thu May 11, 2006 11:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu May 11, 2006 12:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
neilpkemp
Voice


Joined: 13 Nov 2005
Posts: 21

PostPosted: Thu May 11, 2006 1:56 pm    Post subject: Reply with quote

i give up

thxs Sir_Fz works a treat Smile
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber