irssibot.modules
Class ChanVars

java.lang.Object
  |
  +--irssibot.modules.ChanVars

class ChanVars
extends java.lang.Object

Container class for a channel information.

Version:
$Name: $ $Revision: 1.17 $
Author:
Matti Dahlbom

Field Summary
private  int banTime
          Ban time for bk in minutes
private  boolean enforceOpList
          Whether to enforce op list by deopping non-ops
private  boolean enforceResolving
          Whether to enforce dns resolving for hostnames
private  long joinFlushInterval
          Length of join-host flush interval in seconds.
private  java.util.Vector joinHostList
          Join-host list.
private  long lastJoinHostFlushTime
          Time of last join-host flush
private  int maxCloneCount
          Number of identical joins in flush period to generate join flood.
private  int rejoinBanTime
          Ban time for auto-rejoin ban in minutes (NOT YET IMPLEMENTED)
 
Constructor Summary
ChanVars()
          Default constructor
ChanVars(int banTime, int rejoinBanTime, boolean enforceResolving, boolean enforceOpList, long joinFlushInterval, int maxCloneCount)
           
 
Method Summary
 void flushJoinHostList()
          If join flood flush interval full, flush the list and reset interval.
 int getBanTime()
           
 boolean getEnforceOpList()
           
 boolean getEnforceResolving()
           
 long getJoinFlushInterval()
           
 java.util.Vector getJoinHostList()
           
 long getLastJoinHostFlushTime()
           
 int getMaxCloneCount()
           
 int getRejoinBanTime()
           
(package private) static ChanVars parseFromChanvars(ChanVars vars, java.lang.String varstr)
          Parses a chanvars value string.
(package private) static ChanVars parseFromFloodvars(ChanVars vars, java.lang.String varstr)
          Parses a floodvars string and returns a newv ChanVars object with the given floodvars settings.
 void setBanTime(int banTime)
           
 void setEnforceOpList(boolean enforceOpList)
           
 void setEnforceResolving(boolean enforceResolving)
           
 void setJoinFlushInterval(long joinFlushInterval)
           
 void setMaxCloneCount(int maxCloneCount)
           
 void setRejoinBanTime(int rejoinBanTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

banTime

private int banTime
Ban time for bk in minutes


rejoinBanTime

private int rejoinBanTime
Ban time for auto-rejoin ban in minutes (NOT YET IMPLEMENTED)


enforceResolving

private boolean enforceResolving
Whether to enforce dns resolving for hostnames


enforceOpList

private boolean enforceOpList
Whether to enforce op list by deopping non-ops


lastJoinHostFlushTime

private long lastJoinHostFlushTime
Time of last join-host flush


joinHostList

private java.util.Vector joinHostList
Join-host list. Elements are String objects in form of 'ident@host'.


joinFlushInterval

private long joinFlushInterval
Length of join-host flush interval in seconds. Defaults to 10s.


maxCloneCount

private int maxCloneCount
Number of identical joins in flush period to generate join flood. Defaults to 2.

Constructor Detail

ChanVars

public ChanVars(int banTime,
                int rejoinBanTime,
                boolean enforceResolving,
                boolean enforceOpList,
                long joinFlushInterval,
                int maxCloneCount)

ChanVars

public ChanVars()
Default constructor

Method Detail

flushJoinHostList

public void flushJoinHostList()
If join flood flush interval full, flush the list and reset interval.


parseFromFloodvars

static ChanVars parseFromFloodvars(ChanVars vars,
                                   java.lang.String varstr)
Parses a floodvars string and returns a newv ChanVars object with the given floodvars settings.

Parameters:
vars - current chanvars to adjust
varstr - String containing the values
Returns:
the original ChanVars object with adjusted floodvars, or the the exactly original ChanVars if the floodvars values were bad.

parseFromChanvars

static ChanVars parseFromChanvars(ChanVars vars,
                                  java.lang.String varstr)
Parses a chanvars value string. The values are space-separated.

Parameters:
vars - current chanvars to adjust
varstr - String containing the values
Returns:
the original ChanVars object with adjusted chanvars, or the the exactly original ChanVars if the chanvars values were bad.

getBanTime

public int getBanTime()

getRejoinBanTime

public int getRejoinBanTime()

getEnforceResolving

public boolean getEnforceResolving()

getEnforceOpList

public boolean getEnforceOpList()

getLastJoinHostFlushTime

public long getLastJoinHostFlushTime()

getJoinHostList

public java.util.Vector getJoinHostList()

getJoinFlushInterval

public long getJoinFlushInterval()

getMaxCloneCount

public int getMaxCloneCount()

setBanTime

public void setBanTime(int banTime)

setRejoinBanTime

public void setRejoinBanTime(int rejoinBanTime)

setEnforceResolving

public void setEnforceResolving(boolean enforceResolving)

setJoinFlushInterval

public void setJoinFlushInterval(long joinFlushInterval)

setMaxCloneCount

public void setMaxCloneCount(int maxCloneCount)

setEnforceOpList

public void setEnforceOpList(boolean enforceOpList)


IrssiBot (c) 2000-2002 Matti Dahlbom