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 

How set eggdrop for /msg LamaBot invite password #channel ?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
berny
Voice


Joined: 17 Apr 2009
Posts: 3

PostPosted: Fri Apr 17, 2009 4:29 pm    Post subject: How set eggdrop for /msg LamaBot invite password #channel ? Reply with quote

I need invite only channel.

If some user write to bot invite request with correct password bot invite him to channel.
-----------------
example:

1. I go on IRCNET and type to main window: /msg LamaBot invite password #mychannel

2. And bot answer me: [lamaBot] invites you to join [#mychannel]
-----------------

I can not find any script or commands how can I setup bot for this function... can you help me anyone?
Back to top
View user's profile Send private message
berny
Voice


Joined: 17 Apr 2009
Posts: 3

PostPosted: Sat Apr 18, 2009 3:44 am    Post subject: Reply with quote

nobody knows? Sad
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Sat Apr 18, 2009 11:37 am    Post subject: Reply with quote

try:
Code:
set inv_channels {#chan1 #chan2}
set inv_password "mypass"

#############################################
bind msgm - "*" inv_proc

proc inv_proc { nick uhost hand arg } {
   global inv_channels inv_password

   set input_args [split $arg]
   set input_cmd [lindex $input_args 0]
   set input_pass [lindex $input_args 1]
   set input_chan [lindex $input_args 2]

   if {$input_cmd == "invite"} {
      if {[lsearch $inv_channels $input_chan] != -1} {
         if {$input_pass == $inv_password} {
            putserv "INVITE $nick $input_chan"
         }
      }
   }
}

putlog "inv.tcl loaded"


Quote:

/msg botty invite mypass #chan1
17:35 -!- botty invites you to #chan1

/msg botty invite mypass #chan2
17:35 -!- botty invites you to #chan2

/msg botty invite mypass #some.other
- no action


cheers
Back to top
View user's profile Send private message Visit poster's website
dazzie
Voice


Joined: 14 Sep 2009
Posts: 2

PostPosted: Mon Sep 14, 2009 1:45 am    Post subject: Reply with quote

Sorry for bumping old thread but I got error for the script above:

lamestbot: [22:36] Tcl error [inv_proc]: invalid command name " "
lamestbot: [22:36] (dazzie!dazzie@6B72C0ED.IP) !dazzie! failed INVITE #chan
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Mon Sep 14, 2009 3:48 am    Post subject: Reply with quote

weird, I have no problem with this script,
could you paste your eggdrop config here? (full config)

What is your eggdrop version, TCL version?
Back to top
View user's profile Send private message Visit poster's website
dazzie
Voice


Joined: 14 Sep 2009
Posts: 2

PostPosted: Mon Sep 14, 2009 5:31 am    Post subject: Reply with quote

It works now.

I was concentrating too much on the dcc chat that I didn't notice I had received the invite.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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