Changeset 65a4a64
- Timestamp:
- 2010-08-04T20:48:47Z (14 years ago)
- Branches:
- master
- Children:
- f7d12f7
- Parents:
- 23d6165
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r23d6165 r65a4a64 917 917 if( irc->queries == NULL ) 918 918 { 919 /* Alright, alright, let's add a tiny easter egg here. */ 920 static irc_t *last_irc = NULL; 921 static time_t last_time = 0; 922 static int times = 0; 923 static const char *msg[] = { 924 "Oh yeah, that's right.", 925 "Alright, alright. Now go back to work.", 926 "Buuuuuuuuuuuuuuuurp... Excuse me!", 927 "Yes?", 928 "No?", 929 }; 930 931 if( last_irc == irc && time( NULL ) - last_time < 15 ) 932 { 933 if( ( ++times >= 3 ) ) 934 { 935 irc_usermsg( irc, "%s", msg[rand()%(sizeof(msg)/sizeof(char*))] ); 936 last_irc = NULL; 937 times = 0; 938 return; 939 } 940 } 941 else 942 { 943 last_time = time( NULL ); 944 last_irc = irc; 945 times = 0; 946 } 947 919 948 irc_usermsg( irc, "Did I ask you something?" ); 920 949 return;
Note: See TracChangeset
for help on using the changeset viewer.