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.

can anyone help for some modification

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
S
Stefano1990
Voice
Posts: 25
Joined: Mon Jun 04, 2018 10:07 am
Contact:

can anyone help for some modification

Post by Stefano1990 »

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: Select all

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: Select all


* 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: Select all


### 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.
Post Reply