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 

can anyone help for some modification

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


Joined: 04 Jun 2018
Posts: 25

PostPosted: Wed Nov 20, 2019 11:35 pm    Post subject: can anyone help for some modification Reply with quote

can anyone help to add a code raw 340 userip on this proc on join to get the hidden hostmask from user with vhost to match if they hostmask is added on whitelist to not set kickban to trusted users

this is proc join where need this raw 340 code to be add to check userip on join

Code:

proc whitelist:join {nickname hostname handle channel} {
   if { ![channel get $channel whitelist] } {  return 0  }
   global whitelist
   if {![botisop $channel]} {return}
   set userhost [whitelist:weirdclean "$nickname![getchanhost $nickname]"]

   set iswhite 0

   foreach entry [array names whitelist] {
#       set reason [lrange [whitelist:clean $whitelist($entry)] 2 end]
      set whitehost [whitelist:weirdclean $entry]
      if {[string match -nocase $whitehost $userhost]} {

         set iswhite 1
         break
      }
   }

   if {$iswhite == 0} {
      putquick "MODE $channel +b [maskhost $userhost 4]"
      putquick "KICK $channel $nickname :This Channel Is Restricted"
   }

}



Here is other code who need 1 code in proc join to lock unlock channel for massjoin, but is lock the chanel on 1 join single, not in 5:2
need a target code to match 5 join in 2 sec
if someone can help how to make it work to match target massjoin 5:2 to set mode chan in 5 joins not at 1 join only.

here is a example how is work now the massjoin set channel mode

Code:


* Joins: adeline ~nbfvbevk@BD4256E3.445C1F8F.340F9594.IP
* Bot-test sets mode: +i
* adeline was kicked by Bot-test (This Channel Is Restricted)
* Bot-test sets mode: +b *!*@*.445C1F8F.340F9594.IP
* Bot-test sets mode: -i
<@Stef> .t *!*@*.340F9594.IP
-Bot-test- Done. *!*@*.340F9594.IP added on whitelist.
* Stef sets mode: -b *!*@*.445C1F8F.340F9594.IP
* Joins: adeline (~nbfvbevk@BD4256E3.445C1F8F.340F9594.IP
* Parts: adeline (~nbfvbevk@BD4256E3.445C1F8F.340F9594.IP



Code:


### Mass joins,set channel mode on joins:seconds #
set mj 5:2

## Set the Lock Modes
# Bot will change channel mode to the modes you will specify below in case the bot will detect join flood
# To Disable Mode change set it to ""
set mjmode "i"

## Set the time in seconds to Unlock Modes
# The Bot will Unlock the channel after the specified time you will set below
set unlocktime "15"


bind join - * joinflood:massjoin
proc joinflood:massjoin {nickname userhost handle channel} {
 global mjmode  unlocktime whitelist
   if {![botisop $channel] || [matchattr $handle of]} { return 0 }
  set userhost [whitelist:weirdclean "$nickname![getchanhost $nickname]"]

  set iswhite 0


  foreach entry [array names whitelist] {
     set whitehost [whitelist:weirdclean $entry]
     if {[string match -nocase $whitehost $userhost]} {

        set iswhite 1
        break
     }
  }

  if {$iswhite == 0} {

      putquick "MODE $channel +$mjmode"

      utimer $unlocktime [list putquick "MODE $channel -$mjmode"]
    }   
}



_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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