Cases like this are best handled by a qualified authority of Jewish Law so if this question actually applies to you I would recommend speaking with a rabbi.
The Shulchan Aruch rules (YD 217:1) that in terms of vows we follow the local speech patterns (בנדרים אחר לשון בני אדם) so it seems to me in this case the person was obviously joking and therefore we ...
Please don't try this.
The Mishna Nazir 11A says
מָזְגוּ לוֹ אֶת הַכּוֹס וְאָמַר הֲרֵינִי נָזִיר מִמֶּנּוּ הֲרֵי זֶה נָזִיר
If a cup of wine was mixed for someone and he said "I am a nazir from it." He is a Nazir
The Rambam Hilchos Nezirus 1:11 says further (also based on further in the Mishna)
מָזְגוּ לוֹ כּוֹס שֶׁל יַיִן וְנָתְנוּ לוֹ לִשְׁתּוֹת ...