All pastes #955450 Raw Edit

openbot irc patch

public text v1 · immutable
#955450 ·published 2008-03-24 17:18 UTC
rendered paste body
Index: HEAD/openbot.iss
===================================================================
--- HEAD/openbot.iss	(revision 19)
+++ HEAD/openbot.iss	(working copy)
@@ -30,6 +30,7 @@
 #include objects/oParty.iss
 #include objects/oQuest.iss
 #include objects/oBG.iss
+#include objects/oIRCLink.iss
 
 function main()
 {
@@ -67,6 +68,7 @@
 	declarevariable Quest oQuest script
 	declarevariable BG oBG script
 	declarevariable BGConfig oBGConfig script
+	declarevariable IRCLink oIRCLink script
 
 	call Bot.Start
 }
Index: HEAD/gui/gui.xml
===================================================================
--- HEAD/gui/gui.xml	(revision 19)
+++ HEAD/gui/gui.xml	(working copy)
@@ -3719,6 +3719,91 @@
 										</OnLeftClick>
 									</checkbox>
 								</tab>
+
+ 								<tab name="IRC">
+									<checkbox name="chkEnableIRC">
+										<x>10</x>
+										<y>10</y>
+										<width>70</width>
+										<height>15</height>
+										<text>Enable IRC</text>
+										<OnLeftClick>
+											Event[OPENBOT_CONFIG_XBOX]:Execute["chkEnableIRC"]
+										</OnLeftClick>
+									</checkbox>
+
+									<text name="lblIRCServer">
+										<x>10</x>
+										<y>30</y>
+										<width>100</width>
+										<height>20</height>
+										<text>Server:</text>
+									</text>
+									<textentry name="tenIRCServer">
+										<Width>130</Width>
+										<Height>18</Height>
+										<x>10</x>
+										<y>38</y>
+									</textentry>
+									<button name="btnIRCServerSet">
+										<x>145</x>
+										<y>38</y>
+										<Width>25</Width>
+										<Height>18</Height>
+										<text>Set</text>
+										<OnLeftClick>
+											Event[GUI_BUTTON_HANDLE]:Execute["IRCServerSet"]
+										</OnLeftClick>
+									</button>
+
+									<text name="lblIRCNick">
+										<x>10</x>
+										<y>60</y>
+										<width>100</width>
+										<height>20</height>
+										<text>Nick:</text>
+									</text>
+									<textentry name="tenIRCNick">
+										<Width>130</Width>
+										<Height>18</Height>
+										<x>10</x>
+										<y>68</y>
+									</textentry>
+									<button name="btnIRCNickSet">
+										<x>145</x>
+										<y>68</y>
+										<Width>25</Width>
+										<Height>18</Height>
+										<text>Set</text>
+										<OnLeftClick>
+											Event[GUI_BUTTON_HANDLE]:Execute["IRCNickSet"]
+										</OnLeftClick>
+									</button>
+
+									<text name="lblIRCChannel">
+										<x>10</x>
+										<y>90</y>
+										<width>100</width>
+										<height>20</height>
+										<text>Channel:</text>
+									</text>
+									<textentry name="tenIRCChannel">
+										<Width>130</Width>
+										<Height>18</Height>
+										<x>10</x>
+										<y>98</y>
+									</textentry>
+									<button name="btnIRCChannelSet">
+										<x>145</x>
+										<y>98</y>
+										<Width>25</Width>
+										<Height>18</Height>
+										<text>Set</text>
+										<OnLeftClick>
+											Event[GUI_BUTTON_HANDLE]:Execute["IRCChannelSet"]
+										</OnLeftClick>
+									</button>
+								</tab>
 							</tabs>
 						</TabControl>
 					</tab>
@@ -4155,4 +4240,4 @@
 		</Children>
 	</Window>
 
-</ISUI>
\ No newline at end of file
+</ISUI>
Index: HEAD/objects/oConfig.iss
===================================================================
--- HEAD/objects/oConfig.iss	(revision 19)
+++ HEAD/objects/oConfig.iss	(working copy)
@@ -149,6 +149,12 @@
 		This:SetSlider[${uniqueToon},"sldPartyFollowDistance","sldPartyFollowDistance@PartyConfig@HumanPages@Human@Pages@openbot",10]
 		This:SetSlider[${uniqueToon},"sldPartyNearDistance","sldPartyNearDistance@PartyConfig@HumanPages@Human@Pages@openbot",30]
 		This:SetSlider[${uniqueToon},"sldAssistRange","sldAssistRange@PartyConfig@HumanPages@Human@Pages@openbot",100]
+
+		This:SetCheckBox[${uniqueToon},"chkEnableIRC","chkEnableIRC@IRC@HumanPages@Human@Pages@openbot",FALSE]
+		This:LoadEditBox[${uniqueToon},"IRCLinkServer","tenIRCServer@IRC@HumanPages@Human@Pages@openbot"]
+		This:LoadEditBox[${uniqueToon},"IRCLinkChannel","tenIRCChannel@IRC@HumanPages@Human@Pages@openbot"]
+		This:LoadEditBox[${uniqueToon},"IRCLinkNick","tenIRCNick@IRC@HumanPages@Human@Pages@openbot"]
+
 	}
 
 	method SaveToon()
@@ -181,6 +187,7 @@
 		This:SaveCheckBox[${uniqueToon},"chkPartyLeader"]
 		This:SaveCheckBox[${uniqueToon},"chkCanTank"]
 		This:SaveCheckBox[${uniqueToon},"chkEnableQuest"]
+               This:SaveCheckBox[${uniqueToon},"chkEnableIRC"]
 		This:SaveSlider[${uniqueToon},"sldPartyFollowDistance"]
 		This:SaveSlider[${uniqueToon},"sldPartyNearDistance"]
 		This:SaveSlider[${uniqueToon},"sldAssistRange"]
@@ -379,4 +386,4 @@
 		variable string uniqueToon = "${Me.Name}${ISXWoW.RealmName.Replace[',REMOVE,.,REMOVE]}${Me.Class}"
 		This:SaveSlider[${uniqueToon},${settingName}]
 	}
-}
\ No newline at end of file
+}
Index: HEAD/objects/oBase.iss
===================================================================
--- HEAD/objects/oBase.iss	(revision 19)
+++ HEAD/objects/oBase.iss	(working copy)
@@ -30,6 +30,7 @@
 			}
 		}
 		UIElement[ConsoleWindow].FindChild[Console]:Echo["${Time.Time24}: ${Text}"]
+		IRCLink:SayToChannel[${Text}]
 		This:Debug[${Text}]
 		if ${UIElement[chkLogOutput@Config@Pages@openbot].Checked}
 		{
@@ -147,4 +148,4 @@
 		This.${IndexName}:Clear
 		This.${IndexName}:Collapse
 	}
-}
\ No newline at end of file
+}
Index: HEAD/objects/oBot.iss
===================================================================
--- HEAD/objects/oBot.iss	(revision 19)
+++ HEAD/objects/oBot.iss	(working copy)
@@ -80,6 +80,7 @@
 		This:AddPulse["Inventory","Pulse",500,TRUE,FALSE]
 		;This:AddPulse["TalentTree","Pulse",1000,TRUE,FALSE]
 		This:AddPulse["Quest","EventPulse",500,TRUE,FALSE]
+		This:AddPulse["IRCLink","Pulse",75,FALSE,FALSE]
 	}
 
 	method BagUpdate()
@@ -177,6 +178,7 @@
 		Bot:UpdateGlobalCooldown
 		Inventory:Pulse
 		BG:Initialize
+		IRCLink:Initialize
 
 		WoWScript "pcall(loadstring('function SitOrStand() SitStandOrDescendStart() end'))"
 		This:Output["OpenBot ${This.Version} is Online. All ur bot r belong 2 us."]
@@ -298,4 +300,4 @@
 			${This.ObjectName}:${This.PulseName}
 		}
 	}
-}
\ No newline at end of file
+}
Index: HEAD/objects/oGUI.iss
===================================================================
--- HEAD/objects/oGUI.iss	(revision 19)
+++ HEAD/objects/oGUI.iss	(working copy)
@@ -53,6 +53,19 @@
 		}
 		UIElement[lowestRepairPCT@Config@InvPages@Inventory@Pages@OpenBot]:SetText[${LavishSettings[Settings].FindSetting[lowestRepairPCT,"10"]}]
 		UIElement[overAllRepairPCT@Config@InvPages@Inventory@Pages@OpenBot]:SetText[${LavishSettings[Settings].FindSetting[overAllRepairPCT,"20"]}]
+
+               if ${LavishSettings[Settings].FindSetting[chkEnableIRC,FALSE]}
+               {
+                       UIElement[chkEnableIRC@IRC@HumanPages@Human@Pages@openbot]:SetChecked
+               }
+               else
+               {
+                       UIElement[chkEnableIRC@IRC@HumanPages@Human@Pages@openbot]:UnsetChecked
+               }
+               UIElement[tenIRCServer@IRC@HumanPages@Human@Pages@openbot]:SetText[${LavishSettings[Settings].FindSetting[IRCLinkServer,""]}]
+               UIElement[tenIRCChannel@IRC@HumanPages@Human@Pages@openbot]:SetText[${LavishSettings[Settings].FindSetting[IRCLinkChannel,""]}]
+               UIElement[tenIRCNick@IRC@HumanPages@Human@Pages@openbot]:SetText[${LavishSettings[Settings].FindSetting[IRCLinkNick,""]}]
+
 		Inventory.lowestRpairPct:Set[${UIElement[lowestRepairPCT@Config@InvPages@Inventory@Pages@OpenBot].Text}]
 		Inventory.overAllRepairPCT:Set[${UIElement[overAllRepairPCT@Config@InvPages@Inventory@Pages@OpenBot].Text}]
 	}
@@ -460,6 +473,21 @@
 				Inventory:SetMule
 				break
 			}
+			case IRCChannelSet
+			{
+				IRCLink:SetIRCChannel
+				break
+			}
+			case IRCNickSet
+			{
+				IRCLink:SetIRCNick
+				break
+			}
+			case IRCServerSet
+			{
+				IRCLink:SetIRCServer
+				break
+			}
 			case FoodRestock
 			{
 				if ${UIElement[chkRestockFood@Restock@InvPages@Inventory@Pages@OpenBot].Checked}
@@ -974,4 +1002,4 @@
 			}
 		}
 	}
-}
\ No newline at end of file
+}