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.

The INVITE problem,again

Old posts that have not been replied to for several years.
Locked
r
reallove
Voice
Posts: 14
Joined: Fri Aug 13, 2004 4:57 pm

The INVITE problem,again

Post by reallove »

Hello,
I've searched in the archives,looked around the forums .. but I didn't find a script like this : the bot is oped in a big channel,and ANYONE who is not in the channel to auto-invite in that channel with a simple command :"/msg botnick invite #channel" . No password needed,no user-files to be created. Can anyone help me ?
Cheers,
reallove
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Re: The INVITE problem,again

Post by awyeah »

reallove wrote:Hello,
I've searched in the archives,looked around the forums .. but I didn't find a script like this : the bot is oped in a big channel,and ANYONE who is not in the channel to auto-invite in that channel with a simple command :"/msg botnick invite #channel" . No password needed,no user-files to be created. Can anyone help me ?
Cheers,
reallove
In DCC with the bot type:

Code: Select all

.chanset <#channel> need-invite putquick "PRIVMSG ChanServ :INVITE  <#channel> $botnick"
If there is any other way to invite rather than chanserv when a channel has been set to +i, use that then. :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

i thinks he wants the user to be invited by the bot

Code: Select all

bind msg - "invite" msg:invite

proc msg:invite { nick uhost hand arg } {
 set chan [lindex [split $arg] 0]
 if {[string tolower $chan] == "#mychan"}  { 
   putserv "INVITE $nick $chan"
 }
}
you maybe want to add a check if the bot has op or enable multiple chans....shouldnt be a problem with basic tcl knowlege
r
reallove
Voice
Posts: 14
Joined: Fri Aug 13, 2004 4:57 pm

Post by reallove »

GodOfSuicide , thanks a lot . It's ok,it's just what I needed !
}{
reallove.
r
reallove
Voice
Posts: 14
Joined: Fri Aug 13, 2004 4:57 pm

Post by reallove »

hey there,
the inviting thing works very well, thank you. But now a new problem has arisen: everybody knows the trick, even those who aren't supposed to. So i would like to add a new feature to the script: the bot has to check the banlist and if any of the bans in it matches the inviting client's host, must ignore its request.
help help help! :)
Thanx a lot!
n
netux
Voice
Posts: 19
Joined: Fri Jul 30, 2004 8:42 pm

Post by netux »

you could just check if it's a valid user, off course that you have to add all ppl to user list.
using GodOfSuicide sample code:

Code: Select all

bind msg - "invite" msg:invite 

proc msg:invite { nick uhost hand arg } {
  if {[validuser $nick]} { 
    set chan [lindex [split $arg] 0] 
    if {[string tolower $chan] == "#mychan"}  { 
      putserv "INVITE $nick $chan" 
    }
  } 
}
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

For checking the bans in the channels banlist you can use:
if {([ischanban *!*@*.aol.com #mychannel])} {

For checking bans in the bots banlist you can use:
if {([isban *!*@*.aol.com #mychannel])} {

If any of the banmasks matches the channel banlist or bots global banlist then you can make the script return 0 to ignore the request or use 'newignore' to put the user on ignore.

By the way to prevent this you can bind the trigger for specific users to be able to access the !invite command, such as binding to n (owners), m (masters), o (ops), v (voices), f (friends) and etc.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
r
reallove
Voice
Posts: 14
Joined: Fri Aug 13, 2004 4:57 pm

Post by reallove »

[quote="awyeah"]For checking the bans in the channels banlist you can use:
if {([ischanban *!*@*.aol.com #mychannel])} {


..hi there ,
you mean,to add manualy the bans ?! On that channel,we never know who will be banned next (a spammer for example).Here's an example:
The banlist looks like this:
# Channel SetBy Sec Ban
1 #centrala X 29767 *!*@*.ph.*
2 #centrala ViperFox 48743 *!*@82.76.161.72

The user | Alexane (Moi@ip68-2-203-249.ph.ph.cox.net) is banned,it matches the first ban on the banlist.But he requests invite to the bot.Now,the bot is inviting him and Alexane can join the channel.I want something to prevent this.For the ANY ban given,the bot looks in the banlist and compares the users hostname.In that case,the bot should ignore user Alexane for matching the first ban.
Cheers!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

The script you want to produce cannot be very flexible as you want it to be but still can almostly perform the tasks you have mentioned. :roll: Something like this should do it:

Code: Select all

bind msg - !invite msg:invite 

proc msg:invite {nick uhost hand arg} { 
  if {([validuser $nick])} {
    set chan [lindex [split $arg] 0]
    set host "*!*@[lindex [split $uhost @] 1]"
    if {[(string equal -nocase "#centrala" $chan])}  {
     if {([ischanban $host $chan])} {
      return 0 
      } 
      if {(![ischanban $host $chan])} {
       putserv "INVITE $nick $chan"; return 0
      }
    }
  }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Using 'ischanban' you have to know the way the bans are masked. (some bans might be created by other users/bots and have a different format)
Try 'matchban' instead :)
Have you ever read "The Manual"?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

That's why I used the word 'flexible'. Ban types can be of hundreds of types evidently.

Hmmm 'matchban' never heard that one before, though I'll look that up, thanks... user! :wink:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked