equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 eb_hook('event_raw_message', 'greeting_event($chan, $message);'); |
|
4 |
|
5 function greeting_event(&$chan, &$message) |
|
6 { |
|
7 static $part_list = array(); |
|
8 |
|
9 switch($message['action']) |
|
10 { |
|
11 case 'JOIN': |
|
12 $wb = false; |
|
13 if ( isset($part_list[$message['nick']]) ) |
|
14 { |
|
15 if ( $part_list[$message['nick']] + 1800 >= time() ) |
|
16 { |
|
17 $chan->msg("Welcome back."); |
|
18 $wb = true; |
|
19 } |
|
20 } |
|
21 if ( !$wb ) |
|
22 { |
|
23 $append = ''; |
|
24 eval(eb_fetch_hook('event_greeting')); |
|
25 $chan->msg(eb_censor_words("Hi, {$message['nick']}.$append")); |
|
26 } |
|
27 break; |
|
28 case 'PART': |
|
29 $part_list[$message['nick']] = time(); |
|
30 break; |
|
31 } |
|
32 } |