aboutsummaryrefslogtreecommitdiff
path: root/Plugin
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2019-10-10 19:04:14 +1300
committerDavid Phillips <david@sighup.nz>2019-10-10 19:06:24 +1300
commite5575b32bd66784ccd88220d48253b9bc6206356 (patch)
tree4bae143b88552539f0adbaaa34d551b0be6938f6 /Plugin
parent8c01dd91952ab2359c9d34b1ed2b0802fb2a2962 (diff)
downloadidalius-markov.tar.xz
Add ASL pluginmarkov
Diffstat (limited to 'Plugin')
-rw-r--r--Plugin/ASL.pm241
1 files changed, 241 insertions, 0 deletions
diff --git a/Plugin/ASL.pm b/Plugin/ASL.pm
new file mode 100644
index 0000000..3ba41b8
--- /dev/null
+++ b/Plugin/ASL.pm
@@ -0,0 +1,241 @@
+package Plugin::ASL;
+
+use strict;
+use warnings;
+
+sub configure {
+ my $self = shift;
+ my $cmdref = shift;
+
+ $cmdref->($self, "asl", sub { $self->asl(@_); } );
+
+ return $self;
+}
+
+my @sexes = (
+ "M",
+ "m",
+ "f",
+ "F",
+ "both",
+ "idk",
+ "?",
+ "nou",
+ "pls",
+ "yes pls"
+);
+
+my @locs = (
+ "Afghanistan",
+ "Albania",
+ "Algeria",
+ "Andorra",
+ "Angola",
+ "Antigua",
+ "Argentina",
+ "Armenia",
+ "Australia",
+ "Austria",
+ "Azerbaijan",
+ "Bahamas",
+ "Bahrain",
+ "Bangladesh",
+ "Barbados",
+ "Belarus",
+ "Belgium",
+ "Belize",
+ "Benin",
+ "Bhutan",
+ "Bolivia",
+ "Bosnia",
+ "Botswana",
+ "Brazil",
+ "Brunei",
+ "Bulgaria",
+ "Burkina Faso",
+ "Burundi",
+ "Cรดte d'Ivoire",
+ "Cabo Verde",
+ "Cambodia",
+ "Cameroon",
+ "Canada",
+ "Central African Republic",
+ "Chad",
+ "Chile",
+ "China",
+ "Colombia",
+ "Comoros",
+ "Congo",
+ "Costa Rica",
+ "Croatia",
+ "Cuba",
+ "Cyprus",
+ "Czechia",
+ "Democratic Republic of the Congo",
+ "Denmark",
+ "Djibouti",
+ "Dominica",
+ "Dominican Republic",
+ "Ecuador",
+ "Egypt",
+ "El Salvador",
+ "Equatorial Guinea",
+ "Eritrea",
+ "Estonia",
+ "Eswatini",
+ "Ethiopia",
+ "Fiji",
+ "Finland",
+ "France",
+ "Gabon",
+ "Gambia",
+ "Georgia",
+ "Germany",
+ "Ghana",
+ "Greece",
+ "Grenada",
+ "Guatemala",
+ "Guinea",
+ "Guinea-Bissau",
+ "Guyana",
+ "Haiti",
+ "Holy See",
+ "Honduras",
+ "Hungary",
+ "Iceland",
+ "India",
+ "Indonesia",
+ "Iran",
+ "Iraq",
+ "Ireland",
+ "Israel",
+ "Italy",
+ "Jamaica",
+ "Japan",
+ "Jordan",
+ "Kazakhstan",
+ "Kenya",
+ "Kiribati",
+ "Kuwait",
+ "Kyrgyzstan",
+ "Laos",
+ "Latvia",
+ "Lebanon",
+ "Lesotho",
+ "Liberia",
+ "Libya",
+ "Liechtenstein",
+ "Lithuania",
+ "Luxembourg",
+ "Madagascar",
+ "Malawi",
+ "Malaysia",
+ "Maldives",
+ "Mali",
+ "Malta",
+ "Marshall Islands",
+ "Mauritania",
+ "Mauritius",
+ "Mexico",
+ "Micronesia",
+ "Moldova",
+ "Monaco",
+ "Mongolia",
+ "Montenegro",
+ "Morocco",
+ "Mozambique",
+ "Myanmar",
+ "Namibia",
+ "Nauru",
+ "Nepal",
+ "Netherlands",
+ "New Zealand",
+ "Nicaragua",
+ "Niger",
+ "Nigeria",
+ "North Korea",
+ "North Macedonia",
+ "Norway",
+ "Oman",
+ "Pakistan",
+ "Palau",
+ "Palestine State",
+ "Panama",
+ "Papua New Guinea",
+ "Paraguay",
+ "Peru",
+ "Philippines",
+ "Poland",
+ "Portugal",
+ "Qatar",
+ "Romania",
+ "Russia",
+ "Rwanda",
+ "Saint Kitts and Nevis",
+ "Saint Lucia",
+ "Saint Vincent and the Grenadines",
+ "Samoa",
+ "San Marino",
+ "Sao Tome and Principe",
+ "Saudi Arabia",
+ "Senegal",
+ "Serbia",
+ "Seychelles",
+ "Sierra Leone",
+ "Singapore",
+ "Slovakia",
+ "Slovenia",
+ "Solomon Islands",
+ "Somalia",
+ "South Africa",
+ "South Korea",
+ "South Sudan",
+ "Spain",
+ "Sri Lanka",
+ "Sudan",
+ "Suriname",
+ "Sweden",
+ "Switzerland",
+ "Syria",
+ "Tajikistan",
+ "Tanzania",
+ "Thailand",
+ "Timor-Leste",
+ "Togo",
+ "Tonga",
+ "Trinidad",
+ "Tunisia",
+ "Turkey",
+ "Turkmenistan",
+ "Tuvalu",
+ "Uganda",
+ "Ukraine",
+ "UAE",
+ "UK",
+ "USA",
+ "Uruguay",
+ "Uzbekistan",
+ "Vanuatu",
+ "Venezuela",
+ "Vietnam",
+ "Yemen",
+ "Zambia",
+ "Zimbabwe"
+);
+
+# FIXME factor out with other modules
+sub some {
+ my @choices = @_;
+ return $choices[rand(@choices)];
+}
+
+sub asl {
+ my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_;
+
+ my $age = int(rand(100) + 10);
+ my $sex = some(@sexes);
+ my $loc = some(@locs);
+
+ return "$age/$sex/$loc";
+}
+1