GithubHelp home page GithubHelp logo

dgslib's People

Contributors

yrutschle avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jug

dgslib's Issues

Support for black_listing users

This is not really an issue to be reported. It just a code contribution by me on this issue. My bot was invited and played by one user excessively, which I suspect to be an undeclared bot taking off my precious computer resource, I had to resort this to maintain sanity. Here is my code by
diff 2 DGSQBot.pm between mine and your original code:
163c163,167
< if ($self->check_board($m)) {

  if (&black_list($m->sender)) {
  $m->reject_game("reject excessive game invitation");
  $self->message("reject excessive game invitation from " .$m->sender."\n");
  }
        elsif ($self->check_board($m)) {

262a267,286

}

sub black_list {
my $senderid = shift;
my $bool = 0 ;
my %blacklist_hash;
if ( -f "black.lst") {
open (BLACKLST, "black.lst") || die " can not open black list file";
while() {
chomp;
if (/^(\d+)\s*$/) {
my $id = $1;
$blacklist_hash{$id} = 1 ;
}
}
close(BLACKLST);
}
$bool = 1 if ($blacklist_hash{$senderid});

return $bool ;

A file "black.lst" is created to have black_list senderid , one per line to be rejected by bots.

Proper rejection for multi-player games invitation

This issues was found many months ago by me. The bots supported by DGSlib would get stuck and stop playing if there are multi-player-game invitation pending.

Here is DGS discussion link:
http://www.dragongoserver.net/forum/read.php?forum=2&thread=49261

JUG recommended a solution on this:

RE: Bots do not support multi-player games

by   JUG (jug), 2k   2017-05-09 11:58   (No. 2)
Then in your bots invitation-filter you better reject invitations with:game_settings.game_type != "GO"

My comments on this issue is that it is a nice feature to have in DGSlib, but probably is lower priority. After I warned months ago, no repeating incidents happened. I opened this ticket so that we have a document of this bug.

How to make my own lib?

I can't read Perl codes well.
And I want to make my own python or something else version.
Can anyone help me with getting:

game sgf
game states like: board size, handicaps.etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.