Nahuel Posted December 20, 2007 Share Posted December 20, 2007 Looking great Manadar!! Just one complaint: Why do you have such awful desktop wallpaper? Link to comment Share on other sites More sharing options...
jvanegmond Posted December 20, 2007 Author Share Posted December 20, 2007 Looking great Manadar!! Just one complaint: Why do you have such awful desktop wallpaper? Thanks a lot, Nahuel. I just think the wallpaper looks clean for a screenshot. So that people will not get distracted by the wallpaper. github.com/jvanegmond Link to comment Share on other sites More sharing options...
jvanegmond Posted December 20, 2007 Author Share Posted December 20, 2007 Released version 0.22. Changed: Jump from Tray on chat messages option works. Context menu no longer opens when right clicked. Thanks Nahuel! github.com/jvanegmond Link to comment Share on other sites More sharing options...
icadea Posted January 4, 2008 Share Posted January 4, 2008 thanks for the great script.. Link to comment Share on other sites More sharing options...
Nahuel Posted January 4, 2008 Share Posted January 4, 2008 Hey Mandar, link is dead again Link to comment Share on other sites More sharing options...
jvanegmond Posted January 4, 2008 Author Share Posted January 4, 2008 Hey Mandar, link is dead again Thanks for checking regularly. It is up for me, so it must have been a temporary problem.@icadea, you're welcome. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Dhilip89 Posted January 8, 2008 Share Posted January 8, 2008 Thanks for the great script. [u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote] Link to comment Share on other sites More sharing options...
Dhilip89 Posted January 8, 2008 Share Posted January 8, 2008 Messing with unicode: [u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote] Link to comment Share on other sites More sharing options...
jvanegmond Posted January 8, 2008 Author Share Posted January 8, 2008 Awesome, Philip. Any chance I will get the source anytime soon? I don't want to be recreating what you have already done. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Dhilip89 Posted January 8, 2008 Share Posted January 8, 2008 Awesome, Philip. Any chance I will get the source anytime soon? I don't want to be recreating what you have already done. There is the source: [autoit]#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=trayirc.ico #AutoIt3Wrapper_outfile=TrayIRC.exe #AutoIt3Wrapper_UseAnsi=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; ----------------------------- ; - TrayIRC - ; - by Manadar - ; ----------------------------- ; Quick To-Do list: ; - /away or /brb and read it ; - Add a /help command, that lists commands ; Idea list: ; - Spell check ; - Add support for private messages, display them in the channel window ; - Add support for private messages, display them in the new windows ; - /msg other users: /msg Nick Hey what's up?! ; - A seperate codebox for the TrayIRC users... I might rename it to AutoItIRC as well. ; - Double click a user, and get some information about him, like his client ; - Respond to CTCP version requests - Note that CTCP is optional #include <GUIConstants.au3> #include <Constants.au3> #include <IE.au3> #include <Array.au3> Opt("GUIDataSeparatorChar",@LF) ; Some people have | in their names.. Ex.: Manadar|Away Opt("TrayMenuMode",1) ; 1 = no default menu - I need this later Opt("TrayOnEventMode",1) Opt("GUIOnEventMode",1) Opt("GUIResizeMode",$GUI_DOCKAUTO) $sHTML = "<HTML>" & @CR $sHTML &= "<HEAD>" & @CR $sHTML &= '<style type="text/css"><!-- body { margin: 4px; line-height: 16px;} --></style>' $sHTML &= "</HEAD>" & @CR $sHTML &= "<BODY>" $sHTML &= "</BODY>" $sHTML &= "</HTML>" Global $sock, $version = 0.22 Global $server = IniRead("TrayIRC.ini", "options", "Server", "irc.freenode.net") Global $port = 6667 Global $nick = IniRead("TrayIRC.ini", "options", "Nickname", "") Global $channel = IniRead("TrayIRC.ini", "options", "Channel", "#AutoIt") Global $BootWithWindow = IniRead("TrayIRC.ini", "options", "BootWithWindows", "0") Global $ForceActivation = IniRead("TrayIRC.ini", "options", "ForceActivation", "0") $GUIOpt = GUICreate("TrayIRC Options", 225, 223) GUISetOnEvent($GUI_EVENT_CLOSE,"_Opt_Close") GUICtrlCreateGroup("Options", 5, 5, 215, 105) GUICtrlCreateLabel("Nickname", 15, 28, 52, 17) $InputNickname = GUICtrlCreateInput($nick, 75, 25, 126, 21) $OptStartWithWindows = GUICtrlCreateCheckbox("Start TrayIRC with Windows", 15, 55, 187, 17) If Not @Compiled Then GUICtrlSetState($OptStartWithWindows,$GUI_DISABLE) $OptForceActivation = GUICtrlCreateCheckbox("Jump from Tray on Chat messages", 15, 80, 187, 17) GUICtrlCreateGroup("Advanced", 5, 115, 215, 80) GUICtrlCreateLabel("Server", 15, 138, 35, 17) $InputServer = GUICtrlCreateInput($server, 75, 135, 126, 21) GUICtrlCreateLabel("Channel", 15, 163, 43, 17) $InputChannel = GUICtrlCreateInput($channel, 75, 160, 126, 21) $ButtonAccept = GUICtrlCreateButton("Accept", 10, 199, 100, 21) GUICtrlSetOnEvent($ButtonAccept,"_Opt_Accept") $ButtonCancel = GUICtrlCreateButton("Cancel", 118, 199, 100, 21) GUICtrlSetOnEvent($ButtonCancel,"_Opt_Cancel") GUICtrlSetState($InputNickname,$GUI_FOCUS) Global $members[1] = [$nick] Dim $i = 0 If $server = "" OR $nick = "" OR $channel = "" Then GUISetState(@SW_SHOW,$GUIOpt) While $server = "" OR $nick = "" OR $channel = "" ; wait for the option window to have fixed the problem Sleep(100) WEnd EndIf _IEErrorHandlerRegister() $oIE = _IECreateEmbedded() $GUI = GUICreate($channel & " on " & $server & " - TrayIRC " & $version, 600, 398,-1,-1,BitOr($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_MAXIMIZEBOX)) GUISetOnEvent($GUI_EVENT_CLOSE,"_GUI_Close") GUISetOnEvent($GUI_EVENT_MINIMIZE,"_GUI_ToTray") GUISetFont(10, 400, 0, "Verdana") $OutputEdit = GUICtrlCreateObj($oIE, 5, 5, 470, 324) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) $NameList = GUICtrlCreateList("", 475, 5, 121, 329, -1, $WS_EX_STATICEDGE) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS-$GUI_DOCKLEFT+$GUI_DOCKWIDTH) $InputEdit = GUICtrlCreateEdit("", 5, 329 + 5, 590, 60, BitOR($ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL)) GUICtrlSetResizing(-1,$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlSetState($InputEdit,$GUI_DISABLE) _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) _IEHeadInsertEventScript ($oIE, "document", "oncontextmenu", "return false") GUISetState(@SW_SHOW,$GUI) TraySetOnEvent($TRAY_EVENT_PRIMARYUP,"_GUI_FromTray") _GUI_AddGlobalMessage("Thank you for using Manadars TrayIRC (Version " & $version & ")","000000") _GUI_AddGlobalMessage("Connecting to irc.freenode.net ...") TCPStartup () $sock = _IRCConnect($server, $port, $nick); Connects to IRC and Identifies its Nickname While 1 $recv = TCPRecv($sock, 8192) If @error Then _GUI_AddGlobalMessage("Server has disconnected... Bye :[") Sleep(4000) Exit Else ConsoleWrite($recv) EndIf If $recv Then $sData = StringSplit($recv, @CRLF); Splits the messages For $i = 1 To $sData[0] Step 1 $sTemp = StringSplit($sData[$i], " ") If $sTemp[1] = "" Then ContinueLoop; If its empty, Continue! If $sTemp[1] = "PING" Then _IRCPing($sock, $sTemp[2]); Checks for PING replys (There smaller then usual messages so its special! If $sTemp[0] <= 2 Then ContinueLoop; Useless messages for the most part If StringLeft($sData[$i],1) = ":" Then $sData[$i] = StringTrimLeft($sData[$i],1) ;kubrick.freenode.net 353 Manadar = #autoit :Manadar poisonkiller2 poisonkiller WhOOt hansengel WebPrag\work Tobsn Rickbert If $sTemp[0] >= 5 AND $sTemp[3] = $nick AND $sTemp[5] = $channel AND StringRegExp($sData[$i],"(?i)" & StringReplace($nick,"|","\|") & " [@%&~=] " & $channel & " :") Then ; This contains names of people in the channel $sNameList = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) $members = StringSplit($sNameList," ") _ArrayDelete($members,0) _GUI_MemberListSet($members) EndIf ;kubrick.freenode.net 376 Manadar :End of /MOTD command. If $sTemp[3] = $nick AND $sTemp[4] = ":End" AND $sTemp[6] = "/MOTD" Then _GUI_AddGlobalMessage("You have joined " & $channel) GUICtrlSetState($InputEdit,$GUI_ENABLE) GUICtrlSetState($InputEdit,$GUI_FOCUS) _IRCJoinChannel ($sock, $channel) EndIf ;kubrick.freenode.net 433 * Manadar :Nickname is already in use. If $sTemp[0] >= 9 AND $sTemp[4] = $nick AND $sTemp[5] = ":Nickname" Then _GUI_AddGlobalMessage($nick & " is already in use. Renamed to " & $nick & "1","B05A76") $nick &= "1" GUICtrlSetData($InputNickname,$nick) _IRCSendMessage($sock, "NICK " & $nick) EndIf ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PRIVMSG #a :Hai If $sTemp[0] >= 3 AND $sTemp[2] = "PRIVMSG" AND $sTemp[3] = $channel Then $text = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) $snick = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) If StringLeft($text,1) = Chr(1) Then ; /me message $text = StringTrimLeft($text,8) _GUI_AddGlobalMessage($snick & " " & $text,"B05AA0") Else _GUI_AddPersonalMessage($text,$snick) EndIf EndIf ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PART #a :Bye If $sTemp[0] >= 3 AND $sTemp[2] = "PART" AND $sTemp[3] = $channel Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) $message = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) _GUI_AddGlobalMessage($name & " has left the channel:" & $message, "B05A76") _GUI_MemberListSet($members) EndIf ;Zerosploit!n=homgwtfb@84-104-9-159.cable.quicknet.nl QUIT :"im gay" If $sTemp[0] >= 2 AND $sTemp[2] = "QUIT" Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) $message = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) _GUI_AddGlobalMessage($name & " quit the server: " & $message, "B05A76") _GUI_MemberListSet($members) EndIf ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl JOIN :#A If $sTemp[0] >= 3 AND $sTemp[2] = "JOIN" AND $sTemp[3] = ":"&$channel Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) If $name <> $nick Then _ArrayAdd($members,$name) _GUI_AddGlobalMessage($name & " has joined the channel.") _GUI_MemberListSet($members) EndIf EndIf ;XaoCTheoRY!n=homgwtfb@84-104-9-159.cable.quicknet.nl NICK :Zer0sploit If $sTemp[0] >= 3 AND $sTemp[2] = "NICK" Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) $name_after = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) _ArrayAdd($members,$name_after) If $name = $nick Then $nick = $name_after GUICtrlSetData($InputNickname,$nick) EndIf _GUI_AddGlobalMessage($name & " changed name to " & $name_after) _GUI_MemberListSet($members) EndIf ;Nick!Name@Host KICK #Channel User :Reason If $sTemp[0] >= 2 AND $sTemp[2] = "KICK" Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) _GUI_AddGlobalMessage($name & " has been kicked from the channel.") _GUI_MemberListSet($members) EndIf ;kubrick.freenode.net 433 Manadar test :Nickname is already in use. If $sTemp[0] >= 9 AND $sTemp[3] = $nick AND $sTemp[5] = ":Nickname" Then $name = $sTemp[4] _GUI_AddGlobalMessage("Nickname " & $name & " is already in use.","B05A76") EndIf ;kubrick.freenode.net 332 Manadar #AutoIt :Current AutoIt Version: 3.2.10.0 || Post code longer than 3 lines @ http://autoit.pastebin.com || Don't ask to ask; just ask If $sTemp[0] >= 7 AND $sTemp[3] = $nick AND $sTemp[4] = $channel Then $msg = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) If $msg <> "End of /NAMES list." Then _GUI_AddGlobalMessage($msg,"4684DF") EndIf EndIf ;Manadar!n=Miranda@84-104-25-84.cable.quicknet.nl TOPIC #autoit :Current AutoIt Version: 3.2.10.0 || Post code longer than 3 lines @ ht... ;kubrick.freenode.net NOTICE Hickname ** Notice -- Too many nick changes; wait 4 seconds before trying again EndIf Next EndIf If StringInStr(GUICtrlRead($InputEdit),@CRLF) Then _GUI_Enter() EndIf Sleep(10) WEnd Func _Opt_Accept() $temp1 = GUICtrlRead($InputServer) $temp2 = GUICtrlRead($InputNickname) $temp3 = GUICtrlRead($InputChannel) $temp4 = GUICtrlRead($OptStartWithWindows) $temp5 = GUICtrlRead($OptForceActivation) If $temp1 <> "" Then IniWrite("TrayIRC.ini","options", "Server", $temp1) If $server <> $temp1 Then _Reboot() EndIf $server = $temp1 EndIf If $temp2 <> "" Then IniWrite("TrayIRC.ini","options", "Nickname", $temp2) If $sock Then _IRCSendMessage($sock,"NICK " & $temp2) EndIf If $temp3 <> "" Then IniWrite("TrayIRC.ini","options", "Channel", $temp3) If $channel <> $temp3 Then _Reboot() EndIf $channel = $temp3 EndIf If $temp4 = $GUI_CHECKED Then IniWrite("TrayIRC.ini","options", "BootWithWindows", 1) If @Compiled Then RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "TrayIRC", "REG_SZ", @ScriptFullPath) Else IniWrite("TrayIRC.ini","options", "BootWithWindows", 0) RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "TrayIRC") EndIf If $temp5 = $GUI_CHECKED Then IniWrite("TrayIRC.ini","options", "ForceActivation", 1) Else IniWrite("TrayIRC.ini","options", "ForceActivation", 0) EndIf GUISetState(@SW_HIDE,$GUIOpt) $server = IniRead("TrayIRC.ini", "options", "Server", "irc.freenode.net") $port = 6667 $nick = IniRead("TrayIRC.ini", "options", "Nickname", "") $channel = IniRead("TrayIRC.ini", "options", "Channel", "#AutoIt") $BootWithWindow = IniRead("TrayIRC.ini", "options", "BootWithWindows", "0") $ForceActivation = IniRead("TrayIRC.ini", "options", "ForceActivation", "0") EndFunc Func _Opt_Close() If MsgBox(0x24,"TrayIRC", "Are you sure you wish to close TrayIRC?") == 6 Then If $sock Then _IRCQuit($sock,"TrayIRC. [u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote] Link to comment Share on other sites More sharing options...
Dhilip89 Posted January 9, 2008 Share Posted January 9, 2008 This is latest compatible version:[autoit]#Region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_icon=trayirc.ico#AutoIt3Wrapper_outfile=TrayIRC.exe#AutoIt3Wrapper_UseAnsi=n#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****; -----------------------------; - TrayIRC -; - by Manadar -; -----------------------------; Quick To-Do list:; - /away or /brb and read it; - Add a /help command, that lists commands; Idea list:; - Spell check; - Add support for private messages, display them in the channel window; - Add support for private messages, display them in the new windows; - /msg other users: /msg Nick Hey what's up?!; - A seperate codebox for the TrayIRC users... I might rename it to AutoItIRC as well.; - Double click a user, and get some information about him, like his client; - Respond to CTCP version requests - Note that CTCP is optional#include <GUIConstants.au3>#include <Constants.au3>#include <IE.au3>#include <Array.au3>Opt("GUIDataSeparatorChar",@LF) ; Some people have | in their names.. Ex.: Manadar|AwayOpt("TrayMenuMode",1) ; 1 = no default menu - I need this laterOpt("TrayOnEventMode",1)Opt("GUIOnEventMode",1)Opt("GUIResizeMode",$GUI_DOCKAUTO)$sHTML = "<HTML>" & @CR$sHTML &= "<HEAD>" & @CR$sHTML &= '<style type="text/css"><!-- body { margin: 4px; line-height: 16px;} --></style>'$sHTML &= "</HEAD>" & @CR$sHTML &= "<BODY>"$sHTML &= "</BODY>"$sHTML &= "</HTML>"Global $sock, $version = 0.22Global $server = IniRead("TrayIRC.ini", "options", "Server", "irc.freenode.net")Global $port = 6667Global $nick = IniRead("TrayIRC.ini", "options", "Nickname", "")Global $channel = IniRead("TrayIRC.ini", "options", "Channel", "#AutoIt")Global $BootWithWindow = IniRead("TrayIRC.ini", "options", "BootWithWindows", "0")Global $ForceActivation = IniRead("TrayIRC.ini", "options", "ForceActivation", "0")$GUIOpt = GUICreate("TrayIRC Options", 225, 223)GUISetOnEvent($GUI_EVENT_CLOSE,"_Opt_Close")GUICtrlCreateGroup("Options", 5, 5, 215, 105)GUICtrlCreateLabel("Nickname", 15, 28, 52, 17)$InputNickname = GUICtrlCreateInput($nick, 75, 25, 126, 21)$OptStartWithWindows = GUICtrlCreateCheckbox("Start TrayIRC with Windows", 15, 55, 187, 17)If Not @Compiled Then GUICtrlSetState($OptStartWithWindows,$GUI_DISABLE)$OptForceActivation = GUICtrlCreateCheckbox("Jump from Tray on Chat messages", 15, 80, 187, 17)GUICtrlCreateGroup("Advanced", 5, 115, 215, 80)GUICtrlCreateLabel("Server", 15, 138, 35, 17)$InputServer = GUICtrlCreateInput($server, 75, 135, 126, 21)GUICtrlCreateLabel("Channel", 15, 163, 43, 17)$InputChannel = GUICtrlCreateInput($channel, 75, 160, 126, 21)$ButtonAccept = GUICtrlCreateButton("Accept", 10, 199, 100, 21)GUICtrlSetOnEvent($ButtonAccept,"_Opt_Accept")$ButtonCancel = GUICtrlCreateButton("Cancel", 118, 199, 100, 21)GUICtrlSetOnEvent($ButtonCancel,"_Opt_Cancel")GUICtrlSetState($InputNickname,$GUI_FOCUS)Global $members[1] = [$nick]Dim $i = 0If $server = "" OR $nick = "" OR $channel = "" Then GUISetState(@SW_SHOW,$GUIOpt) While $server = "" OR $nick = "" OR $channel = "" ; wait for the option window to have fixed the problem Sleep(100) WEndEndIf_IEErrorHandlerRegister()$oIE = _IECreateEmbedded()$GUI = GUICreate($channel & " on " & $server & " - TrayIRC " & $version & " (Unicode)", 600, 398,-1,-1,BitOr($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_MAXIMIZEBOX))GUISetOnEvent($GUI_EVENT_CLOSE,"_GUI_Close")GUISetOnEvent($GUI_EVENT_MINIMIZE,"_GUI_ToTray")GUISetFont(10, 400, 0, "Verdana")$OutputEdit = GUICtrlCreateObj($oIE, 5, 5, 470, 324)GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)$NameList = GUICtrlCreateList("", 475, 5, 121, 329, -1, $WS_EX_STATICEDGE)GUICtrlSetResizing(-1, $GUI_DOCKBORDERS-$GUI_DOCKLEFT+$GUI_DOCKWIDTH)$InputEdit = GUICtrlCreateEdit("", 5, 329 + 5, 590, 60, BitOR($ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL))GUICtrlSetResizing(-1,$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)GUICtrlSetState($InputEdit,$GUI_DISABLE)_IENavigate($oIE, "about:blank")_IEDocWriteHTML($oIE, $sHTML)_IEHeadInsertEventScript ($oIE, "document", "oncontextmenu", "return false")GUISetState(@SW_SHOW,$GUI)TraySetOnEvent($TRAY_EVENT_PRIMARYUP,"_GUI_FromTray")_GUI_AddGlobalMessage("Thank you for using Manadars TrayIRC (Version " & $version & ")","000000")_GUI_AddGlobalMessage("Connecting to irc.freenode.net ...")TCPStartup ()$sock = _IRCConnect($server, $port, $nick); Connects to IRC and Identifies its NicknameWhile 1 $recv = TCPRecv($sock, 8192) If @error Then _GUI_AddGlobalMessage("Server has disconnected... Bye :[") Sleep(4000) Exit Else ConsoleWrite($recv) EndIf If $recv Then $sData = StringSplit($recv, @CRLF); Splits the messages For $i = 1 To $sData[0] Step 1 $sTemp = StringSplit($sData[$i], " ") If $sTemp[1] = "" Then ContinueLoop; If its empty, Continue! If $sTemp[1] = "PING" Then _IRCPing($sock, $sTemp[2]); Checks for PING replys (There smaller then usual messages so its special! If $sTemp[0] <= 2 Then ContinueLoop; Useless messages for the most part If StringLeft($sData[$i],1) = ":" Then $sData[$i] = StringTrimLeft($sData[$i],1) ;kubrick.freenode.net 353 Manadar = #autoit :Manadar poisonkiller2 poisonkiller WhOOt hansengel WebPrag\work Tobsn Rickbert If $sTemp[0] >= 5 AND $sTemp[3] = $nick AND $sTemp[5] = $channel AND StringRegExp($sData[$i],"(?i)" & StringReplace($nick,"|","\|") & " [@%&~=] " & $channel & " :") Then ; This contains names of people in the channel $sNameList = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) $members = StringSplit($sNameList," ") _ArrayDelete($members,0) _GUI_MemberListSet($members) EndIf ;kubrick.freenode.net 376 Manadar :End of /MOTD command. If $sTemp[3] = $nick AND $sTemp[4] = ":End" AND $sTemp[6] = "/MOTD" Then _GUI_AddGlobalMessage("You have joined " & $channel) GUICtrlSetState($InputEdit,$GUI_ENABLE) GUICtrlSetState($InputEdit,$GUI_FOCUS) _IRCJoinChannel ($sock, $channel) EndIf ;kubrick.freenode.net 433 * Manadar :Nickname is already in use. If $sTemp[0] >= 9 AND $sTemp[4] = $nick AND $sTemp[5] = ":Nickname" Then _GUI_AddGlobalMessage($nick & " is already in use. Renamed to " & $nick & "1","B05A76") $nick &= "1" GUICtrlSetData($InputNickname,$nick) _IRCSendMessage($sock, "NICK " & $nick) EndIf ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PRIVMSG #a :Hai If $sTemp[0] >= 3 AND $sTemp[2] = "PRIVMSG" AND $sTemp[3] = $channel Then $text = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) $snick = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) If StringLeft($text,1) = Chr(1) Then ; /me message $text = StringTrimLeft($text,8) _GUI_AddGlobalMessage($snick & " " & $text,"B05AA0") Else _GUI_AddPersonalMessage($text,$snick) EndIf EndIf ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PART #a :Bye If $sTemp[0] >= 3 AND $sTemp[2] = "PART" AND $sTemp[3] = $channel Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) $message = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) _GUI_AddGlobalMessage($name & " has left the channel:" & $message, "B05A76") _GUI_MemberListSet($members) EndIf ;Zerosploit!n=homgwtfb@84-104-9-159.cable.quicknet.nl QUIT :"im gay" If $sTemp[0] >= 2 AND $sTemp[2] = "QUIT" Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) $message = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) _GUI_AddGlobalMessage($name & " quit the server: " & $message, "B05A76") _GUI_MemberListSet($members) EndIf ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl JOIN :#A If $sTemp[0] >= 3 AND $sTemp[2] = "JOIN" AND $sTemp[3] = ":"&$channel Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) If $name <> $nick Then _ArrayAdd($members,$name) _GUI_AddGlobalMessage($name & " has joined the channel.") _GUI_MemberListSet($members) EndIf EndIf ;XaoCTheoRY!n=homgwtfb@84-104-9-159.cable.quicknet.nl NICK :Zer0sploit If $sTemp[0] >= 3 AND $sTemp[2] = "NICK" Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) $name_after = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) _ArrayAdd($members,$name_after) If $name = $nick Then $nick = $name_after GUICtrlSetData($InputNickname,$nick) EndIf _GUI_AddGlobalMessage($name & " changed name to " & $name_after) _GUI_MemberListSet($members) EndIf ;Nick!Name@Host KICK #Channel User :Reason If $sTemp[0] >= 2 AND $sTemp[2] = "KICK" Then $name = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) $element = __ArraySearch($members,$name) _ArrayDelete($members, $element) _GUI_AddGlobalMessage($name & " has been kicked from the channel.") _GUI_MemberListSet($members) EndIf ;kubrick.freenode.net 433 Manadar test :Nickname is already in use. If $sTemp[0] >= 9 AND $sTemp[3] = $nick AND $sTemp[5] = ":Nickname" Then $name = $sTemp[4] _GUI_AddGlobalMessage("Nickname " & $name & " is already in use.","B05A76") EndIf ;kubrick.freenode.net 332 Manadar #AutoIt :Current AutoIt Version: 3.2.10.0 || Post code longer than 3 lines @ http://autoit.pastebin.com || Don't ask to ask; just ask If $sTemp[0] >= 7 AND $sTemp[3] = $nick AND $sTemp[4] = $channel Then $msg = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) If $msg <> "End of /NAMES list." Then _GUI_AddGlobalMessage($msg,"4684DF") EndIf EndIf ;Manadar!n=Miranda@84-104-25-84.cable.quicknet.nl TOPIC #autoit :Current AutoIt Version: 3.2.10.0 || Post code longer than 3 lines @ ht... ;kubrick.freenode.net NOTICE Hickname ** Notice -- Too many nick changes; wait 4 seconds before trying again EndIf Next EndIf If StringInStr(GUICtrlRead($InputEdit),@CRLF) Then _GUI_Enter() EndIf Sleep(10)WEndFunc _Opt_Accept() $temp1 = GUICtrlRead($InputServer) $temp2 = GUICtrlRead($InputNickname) $temp3 = GUICtrlRead($InputChannel) $temp4 = GUICtrlRead($OptStartWithWindows) $temp5 = GUICtrlRead($OptForceActivation) If $temp1 <> "" Then IniWrite("TrayIRC.ini","options", "Server", $temp1) If $server <> $temp1 Then _Reboot() EndIf $server = $temp1 EndIf If $temp2 <> "" Then IniWrite("TrayIRC.ini","options", "Nickname", $temp2) If $sock Then _IRCSendMessage($sock,"NICK " & $temp2) EndIf If $temp3 <> "" Then IniWrite("TrayIRC.ini","options", "Channel", $temp3) If $channel <> $temp3 Then _Reboot() EndIf $channel = $temp3 EndIf If $temp4 = $GUI_CHECKED Then IniWrite("TrayIRC.ini","options", "BootWithWindows", 1) If @Compiled Then RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "TrayIRC", "REG_SZ", @ScriptFullPath) Else IniWrite("TrayIRC.ini","options", "BootWithWindows", 0) RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "TrayIRC") EndIf If $temp5 = $GUI_CHECKED Then IniWrite("TrayIRC.ini","options", "ForceActivation", 1) Else IniWrite("TrayIRC.ini","options", "ForceActivation", 0) EndIf GUISetState(@SW_HIDE,$GUIOpt) $server = IniRead("TrayIRC.ini", "options", "Server", "irc.freenode.net") $port = 6667 $nick = IniRead("TrayIRC.ini", "options", "Nickname", "") $channel = IniRead("TrayIRC.ini", "options", "Channel", "#AutoIt") $BootWithWindow = IniRead("TrayIRC.ini", "options", "BootWithWindows", "0") $ForceActivation = IniRead("TrayIRC.ini", "options", "ForceActivation", "0")EndFuncFunc _Opt_Close() If MsgBox(0x24,"TrayIRC", "Are you sure you wish to close TrayIRC?") == 6 Then If $sock Then _IRCQuit($sock,"TrayIRC. [u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote] Link to comment Share on other sites More sharing options...
ghetek Posted January 9, 2008 Share Posted January 9, 2008 sadly i am behind a proxy. Link to comment Share on other sites More sharing options...
Apzo Posted January 10, 2008 Share Posted January 10, 2008 Hello This is how I handle the "/msg" part. In the main loop, after the ";Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PRIVMSG #a :Hai" part : ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PRIVMSG User :Hai If $sTemp[0] >= 3 AND $sTemp[2] = "PRIVMSG" AND $sTemp[3] = $nick Then $text = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) $snick = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) _GUI_AddPersonalMessage($text,$snick) _GUI_AddGlobalMessage($snick & ": " & $text, "CC6633") EndIf In the _GUI_Enter() func, I added after Case "/opt" : Case "/msg" $msg = StringTrimLeft($text,5) Local $Sender = StringLeft($msg,StringInStr($msg," ")-1) $msg = StringTrimLeft($msg, StringLen($Sender) + 1) _GUI_AddPersonalMessage($text, $nick) _IRCSendMessage($sock, $msg, $Sender) Curiously, it works Have fun Apzo. All the pop3 functions.Rsync your files on your USB key (or anywhere else) Link to comment Share on other sites More sharing options...
jvanegmond Posted January 20, 2008 Author Share Posted January 20, 2008 Hello This is how I handle the "/msg" part. In the main loop, after the ";Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PRIVMSG #a :Hai" part : ;Manadar!n=Miranda@84-104-140-8.cable.quicknet.nl PRIVMSG User :Hai If $sTemp[0] >= 3 AND $sTemp[2] = "PRIVMSG" AND $sTemp[3] = $nick Then $text = StringTrimLeft($sData[$i],StringInStr($sData[$i],":")) $snick = StringLeft($sData[$i],StringInStr($sData[$i],"!")-1) _GUI_AddPersonalMessage($text,$snick) _GUI_AddGlobalMessage($snick & ": " & $text, "CC6633") EndIf In the _GUI_Enter() func, I added after Case "/opt" : Case "/msg" $msg = StringTrimLeft($text,5) Local $Sender = StringLeft($msg,StringInStr($msg," ")-1) $msg = StringTrimLeft($msg, StringLen($Sender) + 1) _GUI_AddPersonalMessage($text, $nick) _IRCSendMessage($sock, $msg, $Sender) Curiously, it works Have fun Apzo. Very nice. I already had it, but accidentally lost it. Thanks for the rewrite. Could have been simpler though, but that's ok. I am pretty busy, but expect a new release in the next 2 weeks. github.com/jvanegmond Link to comment Share on other sites More sharing options...
James Posted January 20, 2008 Share Posted January 20, 2008 Will someone come and talk to me? It's really irritating! Lol... Very good script Manadar! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
jvanegmond Posted January 21, 2008 Author Share Posted January 21, 2008 Will someone come and talk to me? It's really irritating! Lol... Very good script Manadar!Haha, sorry I haven't been around lately. My laptop is away for repairs again, and I don't have AutoIt anywhere else..I need to upload a new version to my ripway account, but my laptop has the password for that account, and I can't remember it.. so it'll have to wait. github.com/jvanegmond Link to comment Share on other sites More sharing options...
James Posted January 21, 2008 Share Posted January 21, 2008 Who are the randomers on there? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
jvanegmond Posted January 21, 2008 Author Share Posted January 21, 2008 Who are the randomers on there?Ask them? github.com/jvanegmond Link to comment Share on other sites More sharing options...
James Posted January 21, 2008 Share Posted January 21, 2008 I did... They just sat there.. One guy told me not to spam, but I said it wasn't spam because no-one was there to spam... Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
jvanegmond Posted January 22, 2008 Author Share Posted January 22, 2008 I did...They just sat there.. One guy told me not to spam, but I said it wasn't spam because no-one was there to spam...Well, maybe you need to patient. IRC is not like Instant Messaging, that you may be used to. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now