mirror of https://github.com/bvn13/JIrcBot.git
UPDATED to SpringBoot 2
parent
6317a04c03
commit
ce5190c48a
|
@ -7,15 +7,6 @@
|
|||
"channels" : ["#voidforum"],
|
||||
"botName" : "jircbot-test",
|
||||
"masterNick" : "bvn13"
|
||||
},
|
||||
{
|
||||
"enabled" : true,
|
||||
"server" : "irc.mozilla.org",
|
||||
"port" : 6667,
|
||||
"channels" : ["#borsch"],
|
||||
"botName" : "jircbot-test",
|
||||
"botPassword" : "password",
|
||||
"masterNick" : "bvn13"
|
||||
}
|
||||
]
|
||||
}
|
111
jircbot.iml
111
jircbot.iml
|
@ -29,67 +29,69 @@
|
|||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.pircbotx:pircbotx:2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:19.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.10.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.3.6.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring4:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:2.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: ognl:ognl:3.0.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy:2.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.28" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.28" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.28" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.7.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.attoparser:attoparser:2.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.2.14.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.3.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.0.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.2.14.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.18.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.13.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.22.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.7.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.postgresql:postgresql:42.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:6.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-spatial:5.1.0.Final" level="project" />
|
||||
|
@ -103,9 +105,8 @@
|
|||
<orderEntry type="library" name="Maven: com.google.api-client:google-api-client:1.23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.oauth-client:google-oauth-client:1.23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.http-client:google-http-client:1.23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.http-client:google-http-client-jackson2:1.23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava-jdk5:17.0" level="project" />
|
||||
|
|
|
@ -5,7 +5,7 @@ After=network.target
|
|||
[Service]
|
||||
User=bvn13
|
||||
WorkingDirectory=/srv/jircbot
|
||||
ExecStart=/usr/bin/java -jar /srv/jircbot/jircbot-1.2.3.jar
|
||||
ExecStart=/usr/bin/java -jar /srv/jircbot/jircbot-2.0.0.jar
|
||||
SuccessExitStatus=143
|
||||
|
||||
[Install]
|
||||
|
|
29
pom.xml
29
pom.xml
|
@ -6,20 +6,27 @@
|
|||
|
||||
<groupId>ru.bvn13</groupId>
|
||||
<artifactId>jircbot</artifactId>
|
||||
<version>1.2.3</version>
|
||||
<version>${bot.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
|
||||
<properties>
|
||||
<bot.version>2.0.0</bot.version>
|
||||
|
||||
<java.version>1.8</java.version>
|
||||
|
||||
<pircbotx.version>2.1</pircbotx.version>
|
||||
|
||||
<spring.framework.version>1.5.9.RELEASE</spring.framework.version>
|
||||
<spring.orm.version>4.3.13.RELEASE</spring.orm.version>
|
||||
<h2.version>1.4.196</h2.version>
|
||||
<hibernate.version>5.0.12.Final</hibernate.version>
|
||||
<sqlite.jdbc.version>3.21.0.1</sqlite.jdbc.version>
|
||||
<spring.framework.version>2.0.0.RELEASE</spring.framework.version>
|
||||
<spring.orm.version>5.0.4.RELEASE</spring.orm.version>
|
||||
<hibernate.version>5.2.14.Final</hibernate.version>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
@ -53,7 +60,6 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>org.springframework.boot</artifactId>
|
||||
|
@ -66,12 +72,10 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
@ -80,7 +84,6 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
|
@ -95,7 +98,6 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-orm</artifactId>
|
||||
<version>${spring.orm.version}</version>
|
||||
</dependency>
|
||||
<!--PostgreSQL-->
|
||||
<dependency>
|
||||
|
@ -217,16 +219,19 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
|
||||
<!-- Package as an executable jar/war -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>1.5.6.RELEASE</version>
|
||||
<configuration>
|
||||
<mainClass>ru.bvn13.jircbot.MainApp</mainClass>
|
||||
<addResources>true</addResources>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
package ru.bvn13.jircbot;
|
||||
|
||||
import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Created by bvn13 on 30.01.2018.
|
||||
*/
|
||||
@Configuration
|
||||
@EnableTransactionManagement
|
||||
@EnableJpaRepositories(basePackageClasses = MainApp.class)
|
||||
public class JpaConfig {
|
||||
|
||||
@Value("${spring.dataSource.driverClassName}")
|
||||
private String driver;
|
||||
@Value("${spring.dataSource.url}")
|
||||
private String url;
|
||||
@Value("${spring.dataSource.username}")
|
||||
private String username;
|
||||
@Value("${spring.dataSource.password}")
|
||||
private String password;
|
||||
@Value("${spring.hibernate.dialect}")
|
||||
private String dialect;
|
||||
@Value("${spring.hibernate.hbm2ddl.auto}")
|
||||
private String hbm2ddlAuto;
|
||||
@Value("${spring.hibernate.show_sql}")
|
||||
private Boolean showSql;
|
||||
|
||||
@Value("${spring.hibernate.use_sql_comments}")
|
||||
private Boolean useSqlComments;
|
||||
@Value("${spring.hibernate.format_sql}")
|
||||
private Boolean formatSql;
|
||||
|
||||
|
||||
@Bean
|
||||
public DataSource dataSource() {
|
||||
HikariConfig config = new HikariConfig();
|
||||
config.setDriverClassName(driver);
|
||||
config.setJdbcUrl(url);
|
||||
config.setUsername(username);
|
||||
config.setPassword(password);
|
||||
|
||||
config.addDataSourceProperty("useUnicode", "true");
|
||||
config.addDataSourceProperty("characterEncoding", "utf8");
|
||||
config.addDataSourceProperty("cachePrepStmts", "true");
|
||||
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||
config.addDataSourceProperty("useServerPrepStmts", "true");
|
||||
|
||||
return new HikariDataSource(config);
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
|
||||
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
|
||||
entityManagerFactoryBean.setDataSource(dataSource());
|
||||
entityManagerFactoryBean.setPackagesToScan("ru.bvn13.jircbot");
|
||||
entityManagerFactoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
|
||||
|
||||
Properties jpaProperties = new Properties();
|
||||
jpaProperties.put(org.hibernate.cfg.Environment.DIALECT, dialect);
|
||||
jpaProperties.put(org.hibernate.cfg.Environment.HBM2DDL_AUTO, hbm2ddlAuto);
|
||||
jpaProperties.put(org.hibernate.cfg.Environment.SHOW_SQL, showSql);
|
||||
//jpaProperties.put(org.hibernate.cfg.Environment.USE_SQL_COMMENTS, useSqlComments);
|
||||
jpaProperties.put(org.hibernate.cfg.Environment.FORMAT_SQL, formatSql);
|
||||
entityManagerFactoryBean.setJpaProperties(jpaProperties);
|
||||
|
||||
return entityManagerFactoryBean;
|
||||
}
|
||||
|
||||
@Bean(name = "transactionManager")
|
||||
public PlatformTransactionManager annotationDrivenTransactionManager() {
|
||||
return new JpaTransactionManager();
|
||||
}
|
||||
|
||||
}
|
|
@ -14,7 +14,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
@SpringBootApplication
|
||||
@EnableAutoConfiguration//(exclude={DataSourceAutoConfiguration.class})
|
||||
@ComponentScan("ru.bvn13.jircbot")
|
||||
public class MainApp implements CommandLineRunner {
|
||||
public class MainApp {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MainApp.class);
|
||||
|
||||
|
@ -26,8 +26,4 @@ public class MainApp implements CommandLineRunner {
|
|||
logger.info("==============> STARTING <==============");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(String... strings) throws Exception {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ru.bvn13.jircbot.bot;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
import org.pircbotx.Configuration;
|
||||
import org.pircbotx.MultiBotManager;
|
||||
import org.pircbotx.PircBotX;
|
||||
|
@ -11,6 +12,7 @@ import org.pircbotx.hooks.ListenerAdapter;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.bvn13.jircbot.services.YandexSearchService;
|
||||
import ru.bvn13.jircbot.config.JircBotConfiguration;
|
||||
|
@ -36,6 +38,11 @@ public class JircBot extends ListenerAdapter {
|
|||
|
||||
private static Logger logger = LoggerFactory.getLogger(JircBot.class);
|
||||
|
||||
@Value("${bot.version}")
|
||||
private String version;
|
||||
public String getVersion() {
|
||||
return version == null ? "" : version;
|
||||
}
|
||||
|
||||
private JircBotConfiguration config;
|
||||
|
||||
|
@ -54,7 +61,7 @@ public class JircBot extends ListenerAdapter {
|
|||
|
||||
private ScheduledExecutorService executorService;
|
||||
|
||||
MultiBotManager manager = new MultiBotManager();
|
||||
private MultiBotManager manager = new MultiBotManager();
|
||||
|
||||
@Autowired
|
||||
private PingPongListener pingPongListener;
|
||||
|
@ -92,6 +99,7 @@ public class JircBot extends ListenerAdapter {
|
|||
|
||||
@PostConstruct
|
||||
public void postConstruct() {
|
||||
logger.warn("VERSION: "+version);
|
||||
this.executorService = Executors.newScheduledThreadPool(10);
|
||||
this.executorService.schedule(new Runnable() {
|
||||
@Override
|
||||
|
@ -103,19 +111,22 @@ public class JircBot extends ListenerAdapter {
|
|||
this.executorService.scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//logger.warn("check");
|
||||
checkBots();
|
||||
}
|
||||
}, 30*1000, 5, TimeUnit.SECONDS);
|
||||
}, 30, 5, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void preDestroy() {
|
||||
logger.warn("Bot is shutting down...");
|
||||
this.executorService.shutdown();
|
||||
this.manager.stop("Bot is shutting down...");
|
||||
}
|
||||
|
||||
|
||||
private void initBots() {
|
||||
logger.info(">>>>>>>>>>>>>>>>>>>> BOT INIT <<<<<<<<<<<<<<<<<<<<");
|
||||
logger.info(">>>>>>>>>>>>>>>>>>>> BOT INIT : "+getVersion()+" <<<<<<<<<<<<<<<<<<<<");
|
||||
|
||||
//Setup this bot
|
||||
Configuration.Builder templateConfig = new Configuration.Builder()
|
||||
|
@ -129,6 +140,7 @@ public class JircBot extends ListenerAdapter {
|
|||
servers.add(new Configuration.ServerEntry(c.getServer(), c.getPort()));
|
||||
|
||||
Configuration.Builder confBuilder = templateConfig
|
||||
.setRealName("JIrcBot v"+getVersion()+" | github.com/bvn13/JIrcBot")
|
||||
.setName(c.getBotName())
|
||||
.addListener(adminListener)
|
||||
.addListener(pingPongListener)
|
||||
|
@ -177,14 +189,15 @@ public class JircBot extends ListenerAdapter {
|
|||
}
|
||||
|
||||
private void checkBots() {
|
||||
|
||||
this.manager.getBots().forEach(bot -> {
|
||||
if (bot.getState().equals(PircBotX.State.DISCONNECTED)) {
|
||||
try {
|
||||
bot.startBot();
|
||||
} catch (IOException e) {
|
||||
logger.error("Could not start bot at "+bot.getUserBot().getServer(), e);
|
||||
logger.error("Could not start bot at "+bot.getServerHostname(), e);
|
||||
} catch (IrcException e) {
|
||||
logger.error("IrcException while starting bot at "+bot.getUserBot().getServer(), e);
|
||||
logger.error("IrcException while starting bot at "+bot.getServerHostname(), e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -37,9 +37,9 @@ public class AdminListener extends ImprovedListenerAdapter {
|
|||
if (event.getUser().getNick().equals(event.getBot().getNick())) {
|
||||
event.getBot().sendRaw().rawLineNow("MODE " + event.getBot().getUserBot().getNick() + " +B");
|
||||
try {
|
||||
channelSettingsService.createChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), event.getChannel().getName());
|
||||
channelSettingsService.createChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), event.getChannel().getName());
|
||||
} catch (Exception e) {
|
||||
logger.error("Could not create channel settings for channel "+event.getChannel().getName(), e);
|
||||
logger.error("Could not create channel settings for channel "+event.getChannel().getName()+" at "+event.getBot().getServerHostname(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,16 +77,18 @@ public class AdminListener extends ImprovedListenerAdapter {
|
|||
return;
|
||||
}
|
||||
|
||||
String args[] = null;
|
||||
switch (commands[0].toLowerCase()) {
|
||||
case "join" :
|
||||
event.getBot().sendIRC().joinChannel(commands[1]); event.respondPrivateMessage("done"); break;
|
||||
case "leave" :
|
||||
event.getBot().sendRaw().rawLine("PART "+commands[1]); event.respondPrivateMessage("done"); break;
|
||||
case "cmd" :
|
||||
event.getBot().sendRaw().rawLine(command); event.respondPrivateMessage("done"); break;
|
||||
args = commands[1].split(" ", 3);
|
||||
event.getBot().sendRaw().rawLine(args[2]); event.respondPrivateMessage("done"); break;
|
||||
case "set" :
|
||||
try {
|
||||
String args[] = commands[1].split(" ", 4); // set, server, channel, mode/hello-message
|
||||
args = commands[1].split(" ", 4); // set, server, channel, mode/hello-message
|
||||
changeSettings(JircBot.extractServer(args[1]), args[2], args[0], args[3]);
|
||||
event.respondPrivateMessage("done");
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -27,7 +27,7 @@ public class AutoRejoinListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onKick(KickEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), event.getChannel().getName()).getAutoRejoinEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), event.getChannel().getName()).getAutoRejoinEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class AutoRejoinListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onJoin(JoinEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), event.getChannel().getName()).getAutoRejoinEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), event.getChannel().getName()).getAutoRejoinEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BashOrgListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getBashOrgEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getBashOrgEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public class DeferredMessagesListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getDeferredMessagesEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getDeferredMessagesEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public class GoogleSearchListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), this.getChannelName(event)).getGoogleSearchEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), this.getChannelName(event)).getGoogleSearchEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GrammarCorrectorListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), this.getChannelName(event)).getGrammarCorrectionEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), this.getChannelName(event)).getGrammarCorrectionEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public class HelloOnJoinListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onJoin(final JoinEvent event) throws Exception {
|
||||
|
||||
ChannelSettings channelSettings = channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event));
|
||||
ChannelSettings channelSettings = channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event));
|
||||
|
||||
if (!channelSettings.getHelloOnJoinEnabled()) {
|
||||
return;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class LinkPreviewListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getLinkPreviewEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getLinkPreviewEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class LoggerListener extends ImprovedListenerAdapter {
|
|||
|
||||
|
||||
public boolean isEnabled(Event event) throws Exception {
|
||||
return channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getLoggingEnabled();
|
||||
return channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getLoggingEnabled();
|
||||
}
|
||||
|
||||
public boolean isEnabled(String serverName, String channelName) throws Exception {
|
||||
|
@ -72,7 +72,7 @@ public class LoggerListener extends ImprovedListenerAdapter {
|
|||
for (String channelName : onlineUsers.keySet()) {
|
||||
Set<String> users = onlineUsers.get(channelName);
|
||||
if (users.contains(event.getUser().getNick().toLowerCase())) {
|
||||
if (isEnabled(JircBot.extractServer(event.getBot().getUserBot().getServer()), channelName)) {
|
||||
if (isEnabled(JircBot.extractServer(event.getBot().getServerHostname()), channelName)) {
|
||||
log(event.getBot().getServerHostname(), channelName, "User " + event.getUser().getNick() + " quit (" + event.getReason() + ")");
|
||||
users.remove(event.getUser().getNick().toLowerCase());
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class LoggerListener extends ImprovedListenerAdapter {
|
|||
for (String channelName : onlineUsers.keySet()) {
|
||||
Set<String> users = onlineUsers.get(channelName);
|
||||
if (users.contains(event.getUser().getNick().toLowerCase())) {
|
||||
if (isEnabled(JircBot.extractServer(event.getBot().getUserBot().getServer()), channelName)) {
|
||||
if (isEnabled(JircBot.extractServer(event.getBot().getServerHostname()), channelName)) {
|
||||
log(event.getBot().getServerHostname(), channelName,"User "+event.getOldNick()+" is now known as "+event.getNewNick());
|
||||
users.remove(event.getUser().getNick().toLowerCase());
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public class LoggerListener extends ImprovedListenerAdapter {
|
|||
|
||||
@Override
|
||||
public void onOutput(OutputEvent event) throws Exception {
|
||||
if (!isEnabled(JircBot.extractServer(event.getBot().getUserBot().getServer()), event.getLineParsed().get(1))) return;
|
||||
if (!isEnabled(JircBot.extractServer(event.getBot().getServerHostname()), event.getLineParsed().get(1))) return;
|
||||
switch (event.getLineParsed().get(0)) {
|
||||
case "PRIVMSG" :
|
||||
case "NOTICE" :
|
||||
|
|
|
@ -30,7 +30,7 @@ public class RegexCheckerListener extends ImprovedListenerAdapter {
|
|||
|
||||
//TODO: rework with FSM
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getRegexCheckerEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getRegexCheckerEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public class AdviceListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getAdvicesEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getAdvicesEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class CalculatorListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getCalculatorEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getCalculatorEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ public class QuizListener extends ImprovedListenerAdapter {
|
|||
@Override
|
||||
public void onGenericMessage(final GenericMessageEvent event) throws Exception {
|
||||
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getUserBot().getServer()), getChannelName(event)).getQuizEnabled()) {
|
||||
if (!channelSettingsService.getChannelSettings(JircBot.extractServer(event.getBot().getServerHostname()), getChannelName(event)).getQuizEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
name=jircbot
|
||||
bot.version=@bot.version@
|
||||
|
||||
config=config.json
|
||||
|
||||
spring.profiles.active=production
|
||||
|
||||
server.port=8002
|
||||
|
||||
# for PostgreSQL
|
||||
spring.datasource.driverClassName=org.postgresql.Driver
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/jircbot
|
||||
spring.datasource.username=jircbot
|
||||
spring.datasource.password=jircbotpass
|
||||
# for MySQL
|
||||
#spring.datasource.driverClassName=com.mysql.jdbc.Driver
|
||||
#spring.datasource.url=jdbc:mysql://localhost:3306/jircbot
|
||||
#spring.datasource.username=jircbot
|
||||
#spring.datasource.password=jircbotpass
|
||||
|
||||
# for PostgreSQL
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||
# for MySQL
|
||||
#spring.jpa.properties.hibernate.dialect=org.hibernate.spatial.dialect.mysql.MySQLSpatialDialect
|
||||
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.show-sql=false
|
||||
spring.jpa.properties.hibernate.use_sql_comments=true
|
||||
spring.jpa.properties.hibernate.format_sql=true
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
|
||||
name: jircbot
|
||||
|
||||
config: config.json
|
||||
|
||||
server:
|
||||
port: 8002
|
||||
|
||||
spring:
|
||||
# for PostgreSQL
|
||||
dataSource:
|
||||
driverClassName: org.postgresql.Driver
|
||||
url: jdbc:postgresql://localhost:5432/jircbot
|
||||
username: jircbot
|
||||
password: jircbotpass
|
||||
# for MySQL
|
||||
# dataSource:
|
||||
# driverClassName: com.mysql.jdbc.Driver
|
||||
# url: jdbc:mysql://localhost:3306/jircbot
|
||||
# username: jircbot
|
||||
# password: jircbotpass
|
||||
|
||||
hibernate:
|
||||
# for PostgreSQL
|
||||
dialect: org.hibernate.dialect.PostgreSQLDialect
|
||||
# for MySQL
|
||||
# dialect: org.hibernate.spatial.dialect.mysql.MySQLSpatialDialect
|
||||
hbm2ddl.auto: update
|
||||
show_sql: false
|
||||
use_sql_comments: true
|
||||
format_sql: true
|
||||
|
||||
|
|
@ -16,12 +16,10 @@
|
|||
<logger name="ru.bvn13.jircbot" level="ALL"/>
|
||||
<logger name="ru.bvn13.jircbot.listeners" level="ALL"/>
|
||||
<logger name="ru.bvn13.jircbot.listeners.calculator" level="ALL"/>
|
||||
<logger name="org.pircbotx" level="DEBUG"/>
|
||||
<logger name="org.pircbotx" level="WARN"/>
|
||||
|
||||
<logger name="org.hibernate.SQL" level="WARN"/>
|
||||
<!--<logger name="org.hibernate.type" level="TRACE">-->
|
||||
<!--<appender-ref ref="STDOUT" />-->
|
||||
<!--</logger>-->
|
||||
<!--<logger name="org.hibernate.SQL" level="WARN"/>-->
|
||||
<logger name="org.hibernate.type" level="WARN"/>
|
||||
<logger name="org.springframework" level="ERROR"/>
|
||||
<logger name="org.pircbotx.PircBotX" level="ERROR"/>
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
ALTER TABLE public.channel_settings DROP CONSTRAINT uniq_channel_settings_server_host_channel_name;
|
||||
|
||||
ALTER TABLE public.channel_settings RENAME dtcreated TO dt_created;
|
||||
ALTER TABLE public.channel_settings RENAME dtupdated TO dt_updated;
|
||||
ALTER TABLE public.channel_settings RENAME advicesenabled TO advices_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME autorejoinenabled TO auto_rejoin_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME bashorgenabled TO bash_org_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME calculatorenabled TO calculator_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME channelname TO channel_name;
|
||||
ALTER TABLE public.channel_settings RENAME deferredmessagesenabled TO deferred_messages_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME helloonjoinenabled TO hello_on_join_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME linkpreviewenabled TO link_preview_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME quizenabled TO quiz_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME regexcheckerenabled TO regex_checker_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME grammarcorrectionenabled TO grammar_correction_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME googlesearchenabled TO google_search_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME loggingenabled TO logging_enabled;
|
||||
ALTER TABLE public.channel_settings RENAME onjoinmessage TO on_join_message;
|
||||
ALTER TABLE public.channel_settings RENAME serverhost TO server_host;
|
||||
|
||||
|
||||
ALTER TABLE public.deferred_messages RENAME dtcreated TO dt_created;
|
||||
ALTER TABLE public.deferred_messages RENAME dtupdated TO dt_updated;
|
||||
ALTER TABLE public.deferred_messages RENAME channelname TO channel_name;
|
||||
|
||||
|
||||
ALTER TABLE public.irc_messages RENAME dtcreated TO dt_created;
|
||||
ALTER TABLE public.irc_messages RENAME dtupdated TO dt_updated;
|
||||
ALTER TABLE public.irc_messages RENAME channelname TO channel_name;
|
||||
ALTER TABLE public.irc_messages RENAME serverhost TO server_host;
|
||||
|
||||
|
||||
ALTER TABLE public.grammar_correction RENAME dtcreated TO dt_created;
|
||||
ALTER TABLE public.grammar_correction RENAME dtupdated TO dt_updated;
|
Loading…
Reference in New Issue