whitelisted subscribers via editing sigIRC/Emotes/subscribers.txt. Emotes will be downloaded automatically and will be usable and displayed in the client.dev
parent
8924c55247
commit
35fbfa90e5
@ -1,12 +1,9 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<classpath> |
||||
<classpathentry kind="src" path="src"/> |
||||
<classpathentry kind="src" path="lib"/> |
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> |
||||
<classpathentry exported="true" kind="lib" path="D:/Downloads/commons-io-2.5.jar"> |
||||
<attributes> |
||||
<attribute name="javadoc_location" value="jar:file:/D:/Data/commons-io-2.5-javadoc.jar!/"/> |
||||
</attributes> |
||||
</classpathentry> |
||||
<classpathentry kind="lib" path="D:/Downloads/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/> |
||||
<classpathentry kind="lib" path="lib/commons-io-2.5.jar"/> |
||||
<classpathentry kind="lib" path="lib/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/> |
||||
<classpathentry kind="output" path="bin"/> |
||||
</classpath> |
||||
|
@ -1,2 +0,0 @@ |
||||
/commons-io-2.5.jar |
||||
/twitch-api-wrapper-0.3-jar-with-dependencies.jar |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,67 @@ |
||||
package sig; |
||||
|
||||
import java.net.URL; |
||||
|
||||
import com.mb3364.twitch.api.handlers.ChannelResponseHandler; |
||||
import com.mb3364.twitch.api.handlers.ChannelSubscriptionResponseHandler; |
||||
import com.mb3364.twitch.api.handlers.UserSubscriptionResponseHandler; |
||||
import com.mb3364.twitch.api.models.Channel; |
||||
import com.mb3364.twitch.api.models.ChannelSubscription; |
||||
import com.mb3364.twitch.api.models.UserSubscription; |
||||
|
||||
public class SubEmoticon extends Emoticon{ |
||||
String channelName = ""; |
||||
static boolean userCanUseEmoticon=false; |
||||
|
||||
public SubEmoticon(String emoteName, String fileName, String channelName) { |
||||
super(emoteName, fileName); |
||||
this.channelName=channelName; |
||||
} |
||||
public SubEmoticon(String emoteName, URL onlinePath, String channelName) { |
||||
super(emoteName,onlinePath); |
||||
this.channelName=channelName; |
||||
} |
||||
|
||||
public boolean canUserUseEmoticon(String username) { |
||||
userCanUseEmoticon=false; |
||||
/*System.out.println("User: "+username+", Channel: "+channelName+"|"); |
||||
sigIRC.manager.channels().getSubscription(username.trim(), channelName.trim(), new ChannelSubscriptionResponseHandler() { |
||||
|
||||
@Override |
||||
public void onFailure(Throwable arg0) { |
||||
System.out.println(arg0.getMessage()); |
||||
} |
||||
|
||||
@Override |
||||
public void onFailure(int arg0, String arg1, String arg2) { |
||||
System.out.println(arg0+","+arg1+","+arg2); |
||||
} |
||||
|
||||
@Override |
||||
public void onSuccess(ChannelSubscription arg0) { |
||||
System.out.println("User is subscribed to channel "+channelName+"!"); |
||||
userCanUseEmoticon=true; |
||||
} |
||||
|
||||
});*/ |
||||
/*sigIRC.manager.users().getSubscription( new UserSubscriptionResponseHandler() { |
||||
|
||||
@Override |
||||
public void onFailure(Throwable arg0) { |
||||
System.out.println(arg0.getMessage()); |
||||
} |
||||
|
||||
@Override |
||||
public void onFailure(int arg0, String arg1, String arg2) { |
||||
System.out.println(arg0+","+arg1+","+arg2); |
||||
} |
||||
|
||||
@Override |
||||
public void onSuccess(UserSubscription arg0) { |
||||
System.out.println("User is subscribed to channel "+channelName+"!"); |
||||
userCanUseEmoticon=true; |
||||
} |
||||
});*/ |
||||
return true; |
||||
} |
||||
} |
Loading…
Reference in new issue