Skip to content
GitLab
Explore
Sign in
Commits on Source (3)
Added Unreturnable gag
· e58ece1b
Laurence Sebastian Bowes
authored
Oct 21, 2015
e58ece1b
Make the unreturnable gag a bit more interesting..
· dfde1636
Laurence Sebastian Bowes
authored
Oct 21, 2015
dfde1636
Merge branch 'master' into 'master'
· 56a2f88a
Dom Rushbrook
authored
Oct 21, 2015
Unreturnable gag See merge request !3
56a2f88a
Hide whitespace changes
Inline
Side-by-side
src/gags.c
View file @
56a2f88a
...
...
@@ -39,6 +39,7 @@ void gag_nosport(char *text);
void
gag_ack
(
char
*
text
);
void
gag_hazelesque
(
char
*
text
);
void
gag_pklong
(
char
*
text
);
void
gag_unreturnable
(
char
*
text
);
char
*
apply_bork
(
char
*
text
,
const
gag_pattern_t
*
list
,
int
caps
);
/****
...
...
@@ -146,6 +147,10 @@ GagInfo gaglist[]={
"You have just been made to love Disney"
,
"Your love of Disney has faded"
,
gag_pklong
},
{
"unreturnable"
,
"unreturnable"
,
"De-unreturnable"
,
"You have just been made to love node.js and all things hipster..."
,
"Your affinity for javascript slowly fades away and you begin to make rational language choices again..."
,
gag_unreturnable
},
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
};
...
...
@@ -626,6 +631,11 @@ void gag_nosport(char *text)
snprintf
(
text
,
MAXTEXTLENGTH
-
1
,
"%s"
,
apply_bork
(
text
,
nosport
,
0
));
}
void
gag_unreturnable
(
char
*
text
)
{
snprintf
(
text
,
MAXTEXTLENGTH
-
1
,
"%s"
,
apply_bork
(
text
,
unreturnable
,
0
));
}
#define MAX_WORDS 30
/* Mars Attacks! */
...
...
@@ -751,6 +761,7 @@ void gag_pklong(char *text)
gag_wordrep
(
text
,
"disney "
);
}
/**
* old style lookup table gag filters
**/
...
...
src/gagtable.c
View file @
56a2f88a
...
...
@@ -1293,3 +1293,19 @@ const gag_pattern_t nosport[]={
{
NULL
,
NULL
}};
const
gag_pattern_t
unreturnable
[]
=
{
{
"javascript"
,
"node.js"
},
{
"C++"
,
"node.js"
},
{
"c++"
,
"node.js"
},
{
"fortran"
,
"node.js"
},
{
"pascal"
,
"node.js"
},
{
"python"
,
"node.js"
},
{
"java"
,
"node.js"
},
{
"linux"
,
"nodeOS"
},
{
"windows"
,
"nodeOS"
},
{
"debian"
,
"nodeOS"
},
{
"fedora"
,
"nodeOS"
},
{
"silver"
,
"our node.js server"
},
{
NULL
,
NULL
}
};
src/gagtable.h
View file @
56a2f88a
...
...
@@ -16,5 +16,5 @@ extern const gag_pattern_t warez[];
extern
const
gag_pattern_t
french
[];
extern
const
gag_pattern_t
babelfish
[];
extern
const
gag_pattern_t
nosport
[];
extern
const
gag_pattern_t
unreturnable
[];
#endif
/* GAGTABLE_H */