Updated to PircBot 1.4.6 and added support for NickServ password identification using PircBot's identify(password) method.

This commit is contained in:
Erik C. Thauvin 2007-07-19 06:16:38 +00:00
parent 760a2074e5
commit 4d1995ff2c
7 changed files with 126 additions and 100 deletions

View file

@ -1,3 +1,3 @@
#ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler
#Mon Apr 16 15:39:07 GMT 2007
build.num.last=68
#Wed Jul 18 23:09:10 PDT 2007
build.num.last=70

Binary file not shown.

View file

@ -9,15 +9,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/pircbot.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
@ -162,6 +153,15 @@
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/pircbot.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntryProperties />
</component>
</module>

View file

@ -569,7 +569,7 @@
<module fileurl="file://$PROJECT_DIR$/mobibot.iml" filepath="$PROJECT_DIR$/mobibot.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" assert-keyword="false" jdk-15="false" project-jdk-name="1.4.x" />
<component name="ProjectRootManager" version="2" assert-keyword="false" jdk-15="false" project-jdk-name="1.6.x" project-jdk-type="JavaSDK" />
<component name="ProjectRunConfigurationManager" />
<component name="RmicSettings">
<option name="IS_EANABLED" value="false" />

View file

@ -19,11 +19,12 @@
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mobibot.ipr" afterPath="$PROJECT_DIR$/mobibot.ipr" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buildnum.properties" afterPath="$PROJECT_DIR$/buildnum.properties" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mobibot.iws" afterPath="$PROJECT_DIR$/mobibot.iws" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/pircbot.jar" afterPath="$PROJECT_DIR$/lib/pircbot.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mobibot.iml" afterPath="$PROJECT_DIR$/mobibot.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buildnum.properties" afterPath="$PROJECT_DIR$/buildnum.properties" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mobibot.iws" afterPath="$PROJECT_DIR$/mobibot.iws" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@ -153,19 +154,19 @@
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="Mobibot.java" pinned="false" current="false" current-in-tab="false">
<file leaf-file-name="Mobibot.java" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
<provider selected="true" editor-type-id="text-editor">
<state line="1951" column="32" selection-start="47480" selection-end="47488" vertical-scroll-proportion="0.025222551">
<state line="77" column="13" selection-start="2672" selection-end="2672" vertical-scroll-proportion="0.35311574">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Weather.java" pinned="false" current="true" current-in-tab="true">
<file leaf-file-name="Weather.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
<provider selected="true" editor-type-id="text-editor">
<state line="94" column="81" selection-start="3031" selection-end="3031" vertical-scroll-proportion="1.2888244">
<state line="94" column="81" selection-start="3031" selection-end="3031" vertical-scroll-proportion="0.02467344">
<folding />
</state>
</provider>
@ -252,6 +253,10 @@
<option name="myItemId" value="mobibot" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewLibrariesNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@ -321,20 +326,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="mobibot.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="mobibot" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:L:\Projects\java\mobibot" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</component>
<component name="ProjectReloadState">
@ -362,11 +353,11 @@
<property name="cvs_file_history_flatWidth2" value="135" />
<property name="cvs_file_history_flatOrder4" value="4" />
<property name="cvs_file_history_flatOrder1" value="1" />
<property name="vcs_file_view_flatWidth2" value="81" />
<property name="cvs_file_history_flatWidth1" value="135" />
<property name="vcs_file_view_flatWidth2" value="81" />
<property name="vcs_file_view_flatWidth5" value="81" />
<property name="vcs_file_view_flatOrder3" value="3" />
<property name="cvs_file_history_flatOrder2" value="2" />
<property name="vcs_file_view_flatOrder3" value="3" />
<property name="MemberChooser.showClasses" value="true" />
<property name="cvs_file_history_flatWidth4" value="135" />
<property name="vcs_file_view_treeWidth0" value="100" />
@ -432,48 +423,6 @@
</component>
<component name="RestoreUpdateTree" />
<component name="RunManager" selected="Application.Mobibot">
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ADDITIONAL_CLASS_PATH" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<method>
<option name="Make" value="true" />
</method>
</configuration>
<configuration default="true" type="WebLogic Instance" factoryName="Local">
<option name="WORKING_DIRECTORY" />
<option name="HOST" value="localhost" />
<option name="PORT" value="7001" />
<option name="LOCAL" value="true" />
<option name="OPEN_IN_BROWSER" value="true" />
<option name="OPEN_IN_BROWSER_URL" value="/" />
<option name="COMMON_VM_ARGUMENTS" value="" />
<option name="DOMAIN_PATH" value="" />
<option name="USER" value="weblogic" />
<option name="PASSWORD" value="weblogic" />
<option name="SERVER_NAME" value="myserver" />
<option name="DOMAIN_NAME" value="mydomain" />
<predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
<predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
@ -495,6 +444,51 @@
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<module name="" />
<method>
<option name="Make" value="true" />
</method>
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
<configuration default="true" type="WebLogic Instance" factoryName="Local">
<option name="WORKING_DIRECTORY" />
<option name="HOST" value="localhost" />
<option name="PORT" value="7001" />
<option name="LOCAL" value="true" />
<option name="OPEN_IN_BROWSER" value="true" />
<option name="OPEN_IN_BROWSER_URL" value="/" />
<option name="COMMON_VM_ARGUMENTS" value="" />
<option name="DOMAIN_PATH" value="" />
<option name="USER" value="weblogic" />
<option name="PASSWORD" value="weblogic" />
<option name="SERVER_NAME" value="myserver" />
<option name="DOMAIN_NAME" value="mydomain" />
<predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
<predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ADDITIONAL_CLASS_PATH" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<method>
<option name="Make" value="true" />
</method>
</configuration>
<configuration default="false" name="Mobibot" type="Application" factoryName="Application" enabled="false" merge="false">
<option name="MAIN_CLASS_NAME" value="net.thauvin.erik.mobibot.Mobibot" />
@ -717,7 +711,7 @@
<component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667" version="1">
<component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.28625" version="1">
<option name="myPlainMode" value="false" />
<option name="myLastEditedConfigurable" value="Project 'mobibot'" />
</component>
@ -774,9 +768,9 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
<provider selected="true" editor-type-id="text-editor">
<state line="1951" column="32" selection-start="47480" selection-end="47488" vertical-scroll-proportion="0.025222551">
<state line="94" column="81" selection-start="3031" selection-end="3031" vertical-scroll-proportion="0.02467344">
<folding />
</state>
</provider>
@ -802,9 +796,9 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
<provider selected="true" editor-type-id="text-editor">
<state line="94" column="81" selection-start="3031" selection-end="3031" vertical-scroll-proportion="1.2888244">
<state line="77" column="13" selection-start="2672" selection-end="2672" vertical-scroll-proportion="0.35311574">
<folding />
</state>
</provider>

View file

@ -459,6 +459,11 @@ public class Mobibot extends PircBot
*/
private String _identNick = "";
/**
* The NickServ ident password.
*/
private String _ident = "";
/**
* The ignored nicks array.
*/
@ -583,7 +588,7 @@ public class Mobibot extends PircBot
options.addOption(HELP_ARG.substring(0, 1), HELP_ARG, false, "print this help message");
options.addOption(DEBUG_ARG.substring(0, 1), DEBUG_ARG, false,
"print debug & logging data directly to the console");
options.addOption(OptionBuilder.withArgName("file").hasArg().withDescription("use alternate properties file")
options.addOption(OptionBuilder.hasArg().withDescription("use alternate properties file")
.withLongOpt(PROPS_ARG).create(PROPS_ARG.substring(0, 1)));
// Parse the command line
@ -697,6 +702,7 @@ public class Mobibot extends PircBot
final String ignoredNicks = p.getProperty("ignore", "");
final String identNick = p.getProperty("ident-nick", "");
final String identMsg = p.getProperty("ident-msg", "");
final String ident = p.getProperty("ident", "");
final String tags = p.getProperty("tags", "");
// Get the del.icio.us properties
@ -714,6 +720,9 @@ public class Mobibot extends PircBot
bot.setVersion(weblogURL);
bot.setMessageDelay(MESSAGE_DELAY);
// Set the ident password
bot.setIdent(ident);
// Set the ident nick and message
bot.setIdentNick(identNick);
bot.setIdentMsg(identMsg);
@ -774,6 +783,13 @@ public class Mobibot extends PircBot
bot.setVersion(INFO_STRS[0]);
// Identify with NickServ
if (isValidString(ident))
{
bot.identify(ident);
}
// Identify with a specified nick
if (isValidString(identNick) && isValidString(identMsg))
{
bot.sendMessage(identNick, identMsg);
@ -1142,6 +1158,11 @@ public class Mobibot extends PircBot
setVersion(INFO_STRS[0]);
if (isValidString(_ident))
{
identify(_ident);
}
if (isValidString(_identNick) && isValidString(_identMsg))
{
sendMessage(_identNick, _identMsg);
@ -2800,6 +2821,17 @@ public class Mobibot extends PircBot
_googleKey = googleKey;
}
/**
* Sets the ident password.
*
* @param pwd The password.
*/
private void setIdent(String pwd)
{
_ident = pwd;
}
/**
* Sets the ident message.
*

View file

@ -1,5 +1,5 @@
/* Created by JReleaseInfo AntTask from Open Source Competence Group */
/* Creation date Mon Apr 16 15:39:07 GMT 2007 */
/* Creation date Wed Jul 18 23:09:10 PDT 2007 */
package net.thauvin.erik.mobibot;
import java.util.Date;
@ -20,31 +20,21 @@ public class ReleaseInfo {
}
/** buildDate (set during build process to 1176737947817L). */
private static final Date buildDate = new Date(1176737947817L);
/** buildDate (set during build process to 1184825350594L). */
private static final Date buildDate = new Date(1184825350594L);
/**
* Get buildDate (set during build process to Mon Apr 16 15:39:07 GMT 2007).
* Get buildDate (set during build process to Wed Jul 18 23:09:10 PDT 2007).
* @return Date buildDate
*/
public static Date getBuildDate() { return buildDate; }
/**
* Get buildNumber (set during build process to 68).
* Get buildNumber (set during build process to 70).
* @return int buildNumber
*/
public static int getBuildNumber() { return 68; }
/** version (set during build process to "0.3"). */
private static final String version = "0.3";
/**
* Get version (set during build process to "0.3").
* @return String version
*/
public static String getVersion() { return version; }
public static int getBuildNumber() { return 70; }
/** project (set during build process to "mobibot"). */
@ -56,4 +46,14 @@ public class ReleaseInfo {
*/
public static String getProject() { return project; }
/** version (set during build process to "0.3"). */
private static final String version = "0.3";
/**
* Get version (set during build process to "0.3").
* @return String version
*/
public static String getVersion() { return version; }
}