File: follow

package info (click to toggle)
epic 3.004-17.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,192 kB
  • ctags: 3,197
  • sloc: ansic: 40,843; makefile: 530; sh: 129; perl: 17
file content (56 lines) | stat: -rw-r--r-- 1,244 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * follow, 1993
 * You guessed it -- this requires EPIC.
 */
alias clrit {
	stack pop on 311
	stack pop on 314
	stack pop on 312
	stack pop on 401
	stack pop on 406
}
alias followuh {
	stack push on 311
	stack push on 314
	stack push on 406
	stack push on 401
	stack push on 312
	^on ^311 "% % *" {@ function_return [$2];clrit}
	^on ^314 "% % *" {@ function_return [$2];clrit}
	^on ^406 "% % *" {@ function_return [NONE@NONE.NONE];clrit}
	^on ^401 "% % *" :
	^on ^312 "% % *" :

	@ tmpfoo = AUTO_WHOWAS
	^set AUTO_WHOWAS ON
	whois $0
	wait
	wait		/* Requires TWO waits in case a WHOWAS is done */
	^set AUTO_WHOWAS $tmpfoo
}
alias follow {
	@ nicks = []
	@ whatis = show_end_of_msgs
	^set show_end_of_msgs OFF
	@ followed = followuh($0)
	if (followed == [NONE@NONE.NONE])
	{   echo No luck.  Cannot follow }
	{
		stack push on who
		^on ^who * push nicks $$1
		eval who $followed
		wait
		stack pop on who
	}
	@ function_return = nicks
	^set show_end_of_msgs $WHATIS
}

alias ffollow {
        @ nicks = []
        @ followstuff = followuh($0)
        @ tchannel = [$1]?[$1]:[$C]
        @ user_hosts = uh($onchannel($tchannel))
        @ nicks = copattern($followstuff $user_hosts $onchannel($tchannel))
        @ function_return = nicks
}