Skip to content

Commit b90c0f7

Browse files
authored
Merge pull request #4 from Gikkman/develop
Develop
2 parents 64f27f1 + 07fa396 commit b90c0f7

23 files changed

Lines changed: 773 additions & 583 deletions

.gitignore

Lines changed: 133 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,133 @@
1-
# =========================
2-
# Eclipse
3-
# =========================
4-
*.class
5-
6-
# Mobile Tools for Java (J2ME)
7-
.mtj.tmp/
8-
9-
# Package Files #
10-
*.jar
11-
*.war
12-
*.ear
13-
14-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
15-
hs_err_pid*
16-
17-
.metadata
18-
bin/
19-
tmp/
20-
*.tmp
21-
*.bak
22-
*.swp
23-
*~.nib
24-
local.properties
25-
.settings/
26-
.loadpath
27-
.recommenders
28-
29-
# Eclipse Core
30-
.project
31-
32-
# External tool builders
33-
.externalToolBuilders/
34-
35-
# Locally stored "Eclipse launch configurations"
36-
*.launch
37-
38-
# PyDev specific (Python IDE for Eclipse)
39-
*.pydevproject
40-
41-
# CDT-specific (C/C++ Development Tooling)
42-
.cproject
43-
44-
# JDT-specific (Eclipse Java Development Tools)
45-
.classpath
46-
47-
# Java annotation processor (APT)
48-
.factorypath
49-
50-
# PDT-specific (PHP Development Tools)
51-
.buildpath
52-
53-
# sbteclipse plugin
54-
.target
55-
56-
# Tern plugin
57-
.tern-project
58-
59-
# TeXlipse plugin
60-
.texlipse
61-
62-
# STS (Spring Tool Suite)
63-
.springBeans
64-
65-
# Code Recommenders
66-
.recommenders/
67-
68-
# =========================
69-
# MAVEN
70-
# =========================
71-
target/
72-
pom.xml.tag
73-
pom.xml.releaseBackup
74-
pom.xml.versionsBackup
75-
pom.xml.next
76-
release.properties
77-
dependency-reduced-pom.xml
78-
buildNumber.properties
79-
.mvn/timing.properties
80-
81-
# =========================
82-
# Operating System Files
83-
# =========================
84-
85-
# OSX
86-
# =========================
87-
88-
.DS_Store
89-
.AppleDouble
90-
.LSOverride
91-
92-
# Thumbnails
93-
._*
94-
95-
# Files that might appear in the root of a volume
96-
.DocumentRevisions-V100
97-
.fseventsd
98-
.Spotlight-V100
99-
.TemporaryItems
100-
.Trashes
101-
.VolumeIcon.icns
102-
103-
# Directories potentially created on remote AFP share
104-
.AppleDB
105-
.AppleDesktop
106-
Network Trash Folder
107-
Temporary Items
108-
.apdisk
109-
110-
# Windows
111-
# =========================
112-
113-
# Windows image file caches
114-
Thumbs.db
115-
ehthumbs.db
116-
117-
# Folder config file
118-
Desktop.ini
119-
120-
# Recycle Bin used on file shares
121-
$RECYCLE.BIN/
122-
123-
# Windows Installer files
124-
*.cab
125-
*.msi
126-
*.msm
127-
*.msp
128-
129-
# Windows shortcuts
130-
*.lnk
1+
LICENSE
2+
*.md
3+
4+
# =========================
5+
# Eclipse
6+
# =========================
7+
*.class
8+
9+
# Mobile Tools for Java (J2ME)
10+
.mtj.tmp/
11+
12+
# Package Files #
13+
*.jar
14+
*.war
15+
*.ear
16+
17+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
18+
hs_err_pid*
19+
20+
.metadata
21+
bin/
22+
tmp/
23+
*.tmp
24+
*.bak
25+
*.swp
26+
*~.nib
27+
local.properties
28+
.settings/
29+
.loadpath
30+
.recommenders
31+
32+
# Eclipse Core
33+
.project
34+
35+
# External tool builders
36+
.externalToolBuilders/
37+
38+
# Locally stored "Eclipse launch configurations"
39+
*.launch
40+
41+
# PyDev specific (Python IDE for Eclipse)
42+
*.pydevproject
43+
44+
# CDT-specific (C/C++ Development Tooling)
45+
.cproject
46+
47+
# JDT-specific (Eclipse Java Development Tools)
48+
.classpath
49+
50+
# Java annotation processor (APT)
51+
.factorypath
52+
53+
# PDT-specific (PHP Development Tools)
54+
.buildpath
55+
56+
# sbteclipse plugin
57+
.target
58+
59+
# Tern plugin
60+
.tern-project
61+
62+
# TeXlipse plugin
63+
.texlipse
64+
65+
# STS (Spring Tool Suite)
66+
.springBeans
67+
68+
# Code Recommenders
69+
.recommenders/
70+
71+
# =========================
72+
# MAVEN
73+
# =========================
74+
target/
75+
pom.xml.tag
76+
pom.xml.releaseBackup
77+
pom.xml.versionsBackup
78+
pom.xml.next
79+
release.properties
80+
dependency-reduced-pom.xml
81+
buildNumber.properties
82+
.mvn/timing.properties
83+
84+
# =========================
85+
# Operating System Files
86+
# =========================
87+
88+
# OSX
89+
# =========================
90+
91+
.DS_Store
92+
.AppleDouble
93+
.LSOverride
94+
95+
# Thumbnails
96+
._*
97+
98+
# Files that might appear in the root of a volume
99+
.DocumentRevisions-V100
100+
.fseventsd
101+
.Spotlight-V100
102+
.TemporaryItems
103+
.Trashes
104+
.VolumeIcon.icns
105+
106+
# Directories potentially created on remote AFP share
107+
.AppleDB
108+
.AppleDesktop
109+
Network Trash Folder
110+
Temporary Items
111+
.apdisk
112+
113+
# Windows
114+
# =========================
115+
116+
# Windows image file caches
117+
Thumbs.db
118+
ehthumbs.db
119+
120+
# Folder config file
121+
Desktop.ini
122+
123+
# Recycle Bin used on file shares
124+
$RECYCLE.BIN/
125+
126+
# Windows Installer files
127+
*.cab
128+
*.msi
129+
*.msm
130+
*.msp
131+
132+
# Windows shortcuts
133+
*.lnk

twirc/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.gikk</groupId>
66
<artifactId>twirc</artifactId>
7-
<version>0.2</version>
7+
<version>0.3</version>
88
<packaging>jar</packaging>
99

1010
<name>twirc</name>

twirc/src/main/java/com/gikk/twirk/Twirk.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ else if( message.getCommand().equals("PART") ){
447447
}
448448
else if( message.getCommand().equals("PRIVMSG") ){
449449
TwitchUser user = twitchUserBuilder.build(message);
450-
if( user.getName().equalsIgnoreCase("twitchnotify") )
450+
if( user.getDisplayName().equalsIgnoreCase("twitchnotify") )
451451
handleTwitchNotify(message); //The user 'twitchnotify' is used by Twitch to send us messages
452452
else
453453
for(TwirkListener l : listeners )
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
package com.gikk.twirk.enums;
2-
3-
import com.gikk.twirk.types.notice.Notice;
4-
5-
/** Represents different types of NOTICE events.<br>
6-
* See <a href="https://github.com/justintv/Twitch-API/blob/master/IRC.md">
7-
* https://github.com/justintv/Twitch-API/blob/master/IRC.md </a> <br><br>
8-
*
9-
* There are several other types of NOTICE events, such as 'usage_subs_on', and 'already_r9k_on' and so on, but
10-
* I felt that it wasn't really necessary to cover them. Also, since they are not covered by Twitch's documentation,
11-
* they are eligible for change at any moment.*/
12-
public enum NOTICE_EVENT {
13-
SUB_MODE_ON, SUB_MODE_OFF,
14-
SLOW_MODE_ON, SLOW_MODE_OFF,
15-
R9K_MODE_ON, R9K_MODE_OFF,
16-
HOST_MODE_ON, HOST_MODE_OFF,
17-
18-
/**We default to this one if we do not recognize this NOTICE's event type. Since Twitch uses a lot of different undocumented
19-
* NOTICE types, there is need for a event type that works as a catch-all. <br>
20-
* Consider parsing the {@link Notice#getRawNoticeID()}.
21-
*/
22-
OTHER
1+
package com.gikk.twirk.enums;
2+
3+
import com.gikk.twirk.types.notice.Notice;
4+
5+
/** Represents different types of NOTICE events.<br>
6+
* See <a href="https://github.com/justintv/Twitch-API/blob/master/IRC.md">
7+
* https://github.com/justintv/Twitch-API/blob/master/IRC.md </a> <br><br>
8+
*
9+
* There are several other types of NOTICE events, such as 'usage_subs_on', and 'already_r9k_on' and so on, but
10+
* I felt that it wasn't really necessary to cover them. Also, since they are not covered by Twitch's documentation,
11+
* they are eligible for change at any moment.*/
12+
public enum NOTICE_EVENT {
13+
SUB_MODE_ON, SUB_MODE_OFF,
14+
SLOW_MODE_ON, SLOW_MODE_OFF,
15+
R9K_MODE_ON, R9K_MODE_OFF,
16+
HOST_MODE_ON, HOST_MODE_OFF,
17+
18+
/**We default to this one if we do not recognize this NOTICE's event type. Since Twitch uses a lot of different undocumented
19+
* NOTICE types, there is need for a event type that works as a catch-all. <br>
20+
* Consider parsing the {@link Notice#getRawNoticeID()}.
21+
*/
22+
OTHER
2323
};

twirc/src/main/java/com/gikk/twirk/enums/USER_TYPE.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* DEFAULT in this case means that no information was given, and it can be assumed that a user
55
* with DEFAULT user type is a normal user, without any special privileges is this channel.<br><br>
66
*
7-
* USER_TYPE comes with a value. OWNER = 9, MOD = 2, GLOBAL_MOD = ADMIN = STAFF = 1, DEFAULT = 0.<br>
7+
* USER_TYPE comes with a value. OWNER = 9, MOD = 6, GLOBAL_MOD = ADMIN = STAFF = 4, SUBSCRIBER = 2, DEFAULT = 0.<br>
88
* These values can be used to make sure that only users of a certain type can do something.<br><br>
99
*
1010
* For example:<br>
@@ -17,18 +17,20 @@ public enum USER_TYPE{
1717
/** Type for the owner of the channel (i.e. the user with the
1818
* same user name as the channel's name. This type has the highest value, 9*/
1919
OWNER(9),
20-
/** Type for mods in the channel. This type has the second highest value, 2 */
21-
MOD(2),
22-
/** Type for Twitch's global mods. This type has a value of 1*/
23-
GLOBAL_MOD(1),
24-
/** Type for Twitch's admins. This type has a value of 1*/
25-
ADMIN(1),
26-
/** Type for Twitch's staff members. This type has a value of 1*/
27-
STAFF(1),
20+
/** Type for mods in the channel. This type has the second highest value, 6 */
21+
MOD(6),
22+
/** Type for Twitch's global mods. This type has a value of 4*/
23+
GLOBAL_MOD(4),
24+
/** Type for Twitch's admins. This type has a value of 4*/
25+
ADMIN(4),
26+
/** Type for Twitch's staff members. This type has a value of 4*/
27+
STAFF(4),
28+
/** Type for channel subscribers. This type has a value of 2*/
29+
SUBSCRIBER(2),
2830
/** Type for users that does not fit into any other classes. This type has a value of 0*/
2931
DEFAULT(0);
3032

31-
/** This types value. Useful for regulating which kind of users should trigger / can perform
33+
/** This type's value. Useful for regulating which kind of users should trigger / can perform
3234
* certain actions. <br><br>
3335
*
3436
* For example:<br>

0 commit comments

Comments
 (0)