Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
263 changes: 133 additions & 130 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,133 @@
# =========================
# Eclipse
# =========================
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# =========================
# MAVEN
# =========================
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
LICENSE
*.md

# =========================
# Eclipse
# =========================
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# =========================
# MAVEN
# =========================
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
2 changes: 1 addition & 1 deletion twirc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.gikk</groupId>
<artifactId>twirc</artifactId>
<version>0.2</version>
<version>0.3</version>
<packaging>jar</packaging>

<name>twirc</name>
Expand Down
2 changes: 1 addition & 1 deletion twirc/src/main/java/com/gikk/twirk/Twirk.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ else if( message.getCommand().equals("PART") ){
}
else if( message.getCommand().equals("PRIVMSG") ){
TwitchUser user = twitchUserBuilder.build(message);
if( user.getName().equalsIgnoreCase("twitchnotify") )
if( user.getDisplayName().equalsIgnoreCase("twitchnotify") )
handleTwitchNotify(message); //The user 'twitchnotify' is used by Twitch to send us messages
else
for(TwirkListener l : listeners )
Expand Down
44 changes: 22 additions & 22 deletions twirc/src/main/java/com/gikk/twirk/enums/NOTICE_EVENT.java
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package com.gikk.twirk.enums;

import com.gikk.twirk.types.notice.Notice;

/** Represents different types of NOTICE events.<br>
* See <a href="https://github.com/justintv/Twitch-API/blob/master/IRC.md">
* https://github.com/justintv/Twitch-API/blob/master/IRC.md </a> <br><br>
*
* There are several other types of NOTICE events, such as 'usage_subs_on', and 'already_r9k_on' and so on, but
* I felt that it wasn't really necessary to cover them. Also, since they are not covered by Twitch's documentation,
* they are eligible for change at any moment.*/
public enum NOTICE_EVENT {
SUB_MODE_ON, SUB_MODE_OFF,
SLOW_MODE_ON, SLOW_MODE_OFF,
R9K_MODE_ON, R9K_MODE_OFF,
HOST_MODE_ON, HOST_MODE_OFF,

/**We default to this one if we do not recognize this NOTICE's event type. Since Twitch uses a lot of different undocumented
* NOTICE types, there is need for a event type that works as a catch-all. <br>
* Consider parsing the {@link Notice#getRawNoticeID()}.
*/
OTHER
package com.gikk.twirk.enums;
import com.gikk.twirk.types.notice.Notice;
/** Represents different types of NOTICE events.<br>
* See <a href="https://github.com/justintv/Twitch-API/blob/master/IRC.md">
* https://github.com/justintv/Twitch-API/blob/master/IRC.md </a> <br><br>
*
* There are several other types of NOTICE events, such as 'usage_subs_on', and 'already_r9k_on' and so on, but
* I felt that it wasn't really necessary to cover them. Also, since they are not covered by Twitch's documentation,
* they are eligible for change at any moment.*/
public enum NOTICE_EVENT {
SUB_MODE_ON, SUB_MODE_OFF,
SLOW_MODE_ON, SLOW_MODE_OFF,
R9K_MODE_ON, R9K_MODE_OFF,
HOST_MODE_ON, HOST_MODE_OFF,
/**We default to this one if we do not recognize this NOTICE's event type. Since Twitch uses a lot of different undocumented
* NOTICE types, there is need for a event type that works as a catch-all. <br>
* Consider parsing the {@link Notice#getRawNoticeID()}.
*/
OTHER
};
22 changes: 12 additions & 10 deletions twirc/src/main/java/com/gikk/twirk/enums/USER_TYPE.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* DEFAULT in this case means that no information was given, and it can be assumed that a user
* with DEFAULT user type is a normal user, without any special privileges is this channel.<br><br>
*
* USER_TYPE comes with a value. OWNER = 9, MOD = 2, GLOBAL_MOD = ADMIN = STAFF = 1, DEFAULT = 0.<br>
* USER_TYPE comes with a value. OWNER = 9, MOD = 6, GLOBAL_MOD = ADMIN = STAFF = 4, SUBSCRIBER = 2, DEFAULT = 0.<br>
* These values can be used to make sure that only users of a certain type can do something.<br><br>
*
* For example:<br>
Expand All @@ -17,18 +17,20 @@ public enum USER_TYPE{
/** Type for the owner of the channel (i.e. the user with the
* same user name as the channel's name. This type has the highest value, 9*/
OWNER(9),
/** Type for mods in the channel. This type has the second highest value, 2 */
MOD(2),
/** Type for Twitch's global mods. This type has a value of 1*/
GLOBAL_MOD(1),
/** Type for Twitch's admins. This type has a value of 1*/
ADMIN(1),
/** Type for Twitch's staff members. This type has a value of 1*/
STAFF(1),
/** Type for mods in the channel. This type has the second highest value, 6 */
MOD(6),
/** Type for Twitch's global mods. This type has a value of 4*/
GLOBAL_MOD(4),
/** Type for Twitch's admins. This type has a value of 4*/
ADMIN(4),
/** Type for Twitch's staff members. This type has a value of 4*/
STAFF(4),
/** Type for channel subscribers. This type has a value of 2*/
SUBSCRIBER(2),
/** Type for users that does not fit into any other classes. This type has a value of 0*/
DEFAULT(0);

/** This types value. Useful for regulating which kind of users should trigger / can perform
/** This type's value. Useful for regulating which kind of users should trigger / can perform
* certain actions. <br><br>
*
* For example:<br>
Expand Down
Loading