forked from G33kDude/MyRC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.ahk
50 lines (41 loc) · 902 Bytes
/
Plugin.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#NoEnv
#Persistent
#NoTrayIcon
#SingleInstance, Off
SetWorkingDir, %A_LineFile%\..
SetBatchLines, -1
#Include %A_LineFile%\..\lib
#Include Socket.ahk
#Include Json.ahk
#Include Utils.ahk
#Include %A_ScriptDir%\util_arrays
Json = %1%
for Var, Value in Json_ToObj(Json)
%Var% := Value
;Array_Gui(Json_ToObj(Json))
Settings := Ini_Read("Settings.ini")
if (Settings.Bitly.login)
Shorten(Settings.Bitly.login, Settings.Bitly.apiKey)
Chat(Channel, Text)
{
TCP := new SocketTCP()
TCP.Connect("localhost", 26656)
TCP.SendText(Channel "," Text)
}
/*
ChatAction(Channel, Text)
{
TCP := new SocketTCP()
TCP.Connect("localhost", 26656)
Text2 := A_Space . Text
TCP.SendText(Channel "," Text)
}
SendACTION(Channel, Text)
{
TCP := new SocketTCP()
TCP.Connect("localhost", 26656)
TCP.SendText(Channel " ACTION " Text)
;SendCTCP(Channel, "ACTION", Text)
;TCP.SendText(Channel "," Text)
}
*/