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 

kick/ban on invite
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Wed Mar 22, 2017 12:01 pm    Post subject: Reply with quote

Wow, that's strange.

I didn't test the code, as stated, but it seemed logical to me. I did take into consideration that nicks invite nicks, not just to channels, I added the string match *#* but didn't add an else (which would have been for nick based invites).
The bots I do run are currently in an RPG, which means any restarts cause penalties, which is why I don't use them to test. I had expected the code to work, but expectations always have a way of not working out in my favor.
_________________
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
willyw
Owner


Joined: 15 Jan 2009
Posts: 925

PostPosted: Wed Mar 22, 2017 7:50 pm    Post subject: Reply with quote

willyw wrote:


If we can get the hostmask of the inviter every time, then : Yes.

But until then, we are stuck.


Just to let anyone following this thread know:

This has been reported to the eggdrop people. Apparently, it is a bug.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Thu Apr 27, 2017 9:11 am    Post subject: Reply with quote

i came up with this:


Code:
bind raw - INVITE show:invite
 
proc show:invite { nick host key args } {
 global botnick si
  set nik [lindex [split $nick !] 0]
  set host [lindex [split $nick !] 1]
  set ban [lindex [split $nick @] 1]
  set text [lindex [split $key] 1 end]
     putserv "PRIVMSG #cappuccino :INVITE SPAM by\0032 $nik \003\[$host\]: invited to $text"
}




is there a way we can make sure bot bans the inviter on all channels bot has halfOP access or above without the use of internal ban ( i like the channel ops to have the freedom to remove bans at any time ) ( and possibly kick as well if inviter is actually is in channel the eggbot has halfOP and up acces as well )


would it also be possibe to use Spikes way of setting banmasks and stacking bans and ( and kicks if inviter is in common chan )



thanx in advance


http://forum.egghelp.org/viewtopic.php?t=19955
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Thu Apr 27, 2017 11:39 am    Post subject: Reply with quote

Two problems:
- the bind raw accepts 3 arguments and you given it 4.
- stop using arg or args as they have a special meaning in TCL, and instead use text, txt or something else to better represent the argument the proc is awaiting.

Give me an example of a raw INVITE output and will help you out with a proper code.
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Thu Apr 27, 2017 5:39 pm    Post subject: Reply with quote

came up with this:
Code:
bind raw - INVITE show:invite
 
proc show:invite { nick host key} {
 global botnick si
  set nik [lindex [split $nick !] 0]
  set host [lindex [split $nick !] 1]
  set text [lindex [split $key] 1 end]
     putserv "PRIVMSG #channel :INVITE SPAM by\0032 $nik \003\[$host\]: invited to $text"
}

what kind of an output did you mean ?

the message in channel seems to get hostmask everytime as well as the channel
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Fri Apr 28, 2017 12:41 am    Post subject: Reply with quote

On Undernet network where i tested an invite the RAW i seen was: INVITE my_name #channel.

If you have mIRC type in status window /debug @raw and a window called @raw should appear. Now ask a friend to invite you to a channel and copy/paste what you get there, maybe on your network you get something different.
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Fri Apr 28, 2017 7:43 am    Post subject: Reply with quote

ok did that tested on dalnet and on my own network got this response:
Quote:
:nick!user@host INVITE nick :#channel
Back to top
View user's profile Send private message
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 144
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Fri Apr 28, 2017 11:59 pm    Post subject: Reply with quote

try with
Code:

set mychansk "#cappuccino"

bind raw - INVITE show:invite
 
proc show:invite { nick key txt} {
 global mychansk
 foreach channel [split $mychansk] {
  set nik [lindex [split $nick !] 0]
  set xhost [lindex [split $nick !] 1]
  set xtext [lindex $txt 1]
    putserv "PRIVMSG $channel :INVITE SPAM by \2$nik\2  (\2$xhost\2): invited to \2$xtext\2"
} }

_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Sat Apr 29, 2017 10:34 am    Post subject: Reply with quote

does anyone know how to modify this to get this it to set ban ( for inviter ) on all channels the bot is opped ( and possibly kick inviter if in channel ) and i would prefer a channel ban to allow more freedom for channel ops to remove bans at any time

tnx in advance.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Sun Apr 30, 2017 9:30 am    Post subject: Reply with quote

ill be using this for the moment i guess

i couldnt think of a way to make use of the foreach
Code:
bind raw - INVITE show:invite
 
proc show:invite { nick host key } {
 global botnick si
  set nik [lindex [split $nick !] 0]
  set host [lindex [split $nick !] 1]
  set text [lindex [split $key] 1 end]
  putquick "MODE #channel1 +b *!*@[lindex [split $host @] 1]" -next
  putquick "MODE #channel2 +b *!*@[lindex [split $host @] 1]" -next
  putquick "MODE #channel3 +b *!*@[lindex [split $host @] 1]" -next
  putquick "MODE #channel4 +b *!*@[lindex [split $host @] 1]" -next
  putquick "MODE #channel5 +b *!*@[lindex [split $host @] 1]" -next
  putquick "MODE #channel6 +b *!*@[lindex [split $host @] 1]" -next
}

Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Mon May 01, 2017 6:30 am    Post subject: Reply with quote

Won't something simple as:
Code:

bind raw - INVITE show:invite

proc show:invite {from key txt} {
   # get the nick, user and host
   scan $from {%[^!]!%[^@]@%s} nick user host
   
   # loop all channels
   foreach chan [channels] {
      
      # if the bot is not channel operator no point into continuing
      if {![botisop $chan]} continue
      
      # if the inviter isn't on the channel continue
      if {![onchan $nick $chan]} continue
      
      # do the +b and kick?
      pushmode $chan +b "*!*@$host"
      putkick $chan $nick "Invite spam"
   }
}

do what you wanted?

I see previous comments but I don't understand where's the problem with the invite command. mind giving an example?
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Mon May 01, 2017 8:28 am    Post subject: Reply with quote

that seems to work

is it possible to have the same method of banmask like spike used in

http://forum.egghelp.org/viewtopic.php?t=19955

the stacked bans and kicks seem a good method incase a mass invite accures
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Mon May 01, 2017 11:46 am    Post subject: Reply with quote

See how works as is right now and if needed I guess we can add that, but doubt will get so many invites at the same time to make this worth adding.
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Mon May 01, 2017 6:24 pm    Post subject: Reply with quote

works well thx caesar nicely done
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Tue May 02, 2017 8:53 am    Post subject: Reply with quote

On some networks like Dalnet it is possible to mass invite so it might be a good option to have.
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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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