Skip to content

Commit

Permalink
finally fixed yt stats date | fixed no permission msg getting sent in pm
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ckscor3 committed Jun 10, 2016
1 parent 1674244 commit 58f5b06
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#Changelog
---
####5.7.4
- Fixed YouTube stats' date (now removes everything infront of the first number, which should include many many languages)
- Fixed "No permissions" message getting sent to the user as a PM instead of a channel message

####5.7.3
- Merged user/channel message private commands
- Devoice Geffy if he joins #bl4ckscor3
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>bl4ckscor3.bot</groupId>
<artifactId>bl4ckb0t</artifactId>
<version>5.7.3</version>
<version>5.7.4</version>
<name>bl4ckb0t</name>
<description>An IRC bot designed and managed by bl4ckscor3</description>
<url>https://github.com/bl4ckscor3/bl4ckb0t</url>
Expand Down
2 changes: 1 addition & 1 deletion src/bl4ckscor3/bot/bl4ckb0t/CMDListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void onMessage(MessageEvent event) throws Exception
{
if(cmd.getPermissionLevel() > permissionLevel)
{
Utilities.noPermission(event.getUser().getNick());
Utilities.noPermission(event.getChannel().getName());
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/bl4ckscor3/bot/bl4ckb0t/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class Core
public static Bot bot;
private static boolean wasStartedAsWIP;
private static final String botName = "bl4ckb0t";
private static final String version = "5.7.3";
private static final String version = "5.7.4";
private static ConfigurationFile customConfig;

public static void main(String args[]) throws IOException, IrcException
Expand Down
2 changes: 1 addition & 1 deletion src/bl4ckscor3/bot/bl4ckb0t/misc/YouTubeStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else if(s.contains("youtu.be/"))
date = doc.select(".watch-time-text").get(0).text();
uploader = doc.select(".yt-user-info > a:nth-child(1)").get(0).text();

date = date.replaceAll("[^0-9.][^ A-Za-z ]*3", ""); //replace everything except 3 letters surrounded by spaces, numbers and . with nothing
date = date.replaceAll("^[^0-9]*", ""); //replace everything infront of the first number
views = views.replaceAll("[^0-9+.]", ""); //replace everything except numbers, + and . with nothing
Utilities.sendStarMsg(channel,
Colors.BOLD + Utilities.backgroundColor(Colors.WHITE, Colors.BLACK) + "You" + Utilities.backgroundColor(Colors.RED, Colors.WHITE) + "Tube" + Colors.NORMAL,
Expand Down

0 comments on commit 58f5b06

Please sign in to comment.