- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
DiKKv: Difference between revisions
imported>Hipcrime →External links: archive.org |
imported>Uberfukken No edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
<?php | <?php | ||
$CONFIG = array(); | $CONFIG = array(); | ||
$CONFIG['server'] = 'irc. | $CONFIG['server'] = 'irc.gnaa.eu'; | ||
$CONFIG['nick'] = 'DiKKv'; | $CONFIG['nick'] = 'DiKKv'; | ||
$CONFIG['port'] = 6667; | $CONFIG['port'] = 6667; | ||
Line 166: | Line 166: | ||
==External links== | ==External links== | ||
* [https://web.archive.org/web/20100312075726/http://www.kuro5hin.org/story/2004/4/7/192752/7337 My contribution to the study of AI | * <s>[https://web.archive.org/web/20100312075726/http://www.kuro5hin.org/story/2004/4/7/192752/7337]</s> {{archive|2eqcy|My contribution to the study of AI}}, [[Kuro5hin]] | ||
* [https://web.archive.org/web/20100204193054/http://www.kuro5hin.org/story/2004/4/8/225652/4435 Dikky meets his automated replacement | * <s>[https://web.archive.org/web/20100204193054/http://www.kuro5hin.org/story/2004/4/8/225652/4435]</s> {{archive|DDKNT|Dikky meets his automated replacement}} | ||
{{gnaa}} | |||
{{stub}} | {{stub}} | ||
{{softwarez}} | |||
[[Category:Softwarez]] | [[Category:Softwarez]] | ||
Latest revision as of 00:53, 14 March 2019
DiKKv, a product of the GNAA, is a PHP script that randomly plays back quotes from three months' IRC logs of Martin "DiKKy Heartiez" Liland, the GNAA's new president and current Norwegian Soldier.
The script contains intelligent analysis of chat. For example, it is able to determine the "busyness" of an IRC channel. If a channel has more talking, DiKKv pastes more quotes. Interestingly enough, the quote database has been tuned to not only resemble the real DiKKy Hearties, but to pick certain quotes based on chat context to make the bot seem more real. It is very effective at making annoyed IRC netizens talk to it (usually telling it to STFU).
A popular fork of Dikkv is known as Grogv.
Source
<?php $CONFIG = array(); $CONFIG['server'] = 'irc.gnaa.eu'; $CONFIG['nick'] = 'DiKKv'; $CONFIG['port'] = 6667; $cr = '#blah'; $CONFIG['name'] = 'Hotmail'; set_time_limit(0); $con = array(); $con['socket'] = fsockopen($CONFIG['server'], $CONFIG['port']); if (!$con['socket']) { die("Could not connect to: ". $CONFIG['server'] ." on port ".$CONFIG['port']); } cmd_send("USER ". $CONFIG['nick'] ." 0 0 :". $CONFIG['name']); cmd_send("NICK ". $CONFIG['nick'] ." 0"); init(); function init() { global $con, $CONFIG, $cr; $firstTime = true; while (!feof($con['socket'])) { $con['buffer']['all'] = trim(fgets($con['socket'], 4096)); print date("[d/m @ H:i]")."<- ".$con['buffer']['all'] ."\n"; if ($firstTime == true) { cmd_send("JOIN $cr"); $firstTime = false; } if (substr($con['buffer']['all'], 0, 6) == 'PING :') { cmd_send('PONG :'.substr($con['buffer']['all'], 6)); } elseif ($old_buffer != $con['buffer']['all']) { $buf_r = $con['buffer']['all']; # someone said something in or joined watched channel if ( (eregi("([^!~:]+)![^ ]+ PRIVMSG $cr :.+", $buf_r)) || (eregi("([^!~:]+)![^ ]+ JOIN :$cr", $buf_r)) ) { # 30% chance of blabbing by default $i = rand(1, 10); # if someone addressed us, increase chance of blab if (eregi(" PRIVMSG $cr :.{0,6}".$CONFIG['nick'], $buf_r)) { $i += 6; } # if someone says 'HY', increase chance of blab if (eregi(" PRIVMSG $cr :.?H[IY]", $buf_r)) { $i += 5; } # keyword "hearties" if (eregi(" PRIVMSG $cr :.*hearties", $buf_r)) { $i += 3; } # keyword "Di[CK]Ky" if (eregi(" PRIVMSG $cr :.*Di[CK]Ky", $buf_r)) { $i += 3; } # talking entirely in capital letters is a trigger if (ereg(" PRIVMSG ".sql_regcase($cr)." :[A-Z ]+$", $buf_r)) { $i += 3; } # keywords of weight 2 (these are extended regexes) foreach (array( " r u ", " u ", " ur ", "<3", "^r u ", "brit", "but$", "faggot", "irssi", "lol", "mirc", "nigger", "noes", "stfu", "yeah") as $keyword) { if (eregi(" PRIVMSG $cr :.*$keyword", $buf_r)) { $i += 2; } } # if someone speaks in bold, increase chance of blab if (eregi(" PRIVMSG $cr :\002", $buf_r)) { $i += 1; } # if someone only says one character, decrease chance if (eregi(" PRIVMSG $cr :.$", $buf_r)) { $i -= 2; } echo "$i\n"; while ($i > 7) { usleep(rand(50000, 1000000)); if ($i > 15) { actdikky(1); } else { actdikky(0); } $i -= 10; } } # someone wants us to quit if (eregi(".+PRIVMSG ".$CONFIG['nick']." :die", $buf_r)) { cmd_send("QUIT"); } $old_buffer = $con['buffer']['all']; } } } function cmd_send($command) { global $con, $time, $CONFIG; fputs($con['socket'], "$command\n\r"); echo date("[d/m @ H:i]")."-> $command\n\r"; } function actdikky($colour) { global $cr; $s = `fortune dikky`; $s = trim($s); if ($s != "") { if ($colour) { $s = chr(3).chr(rand(50, 57)).$s.chr(3); } cmd_send("PRIVMSG $cr :$s"); } } ?>
External links
DiKKv is part of a series on the Gay Nigger Association of America. | |
---|---|
|
DiKKv is part of a series on Visit the Softwarez Portal for complete coverage. |