File: misc

package info (click to toggle)
teknap 1.4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,428 kB
  • ctags: 6,297
  • sloc: ansic: 55,591; makefile: 545; sh: 112
file content (119 lines) | stat: -rw-r--r-- 1,741 bytes parent folder | download
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
 * Miscellaneous stuff for TekNap
 *
 * Author: Brian Weiss <brian@got.net> - 2000, 2001
 */

alias cme (text)
{
	if (text)
	{
		raw 824 $C \"$cparse("$text")\"
	}{
		xecho -b Usage: /cme <text>
		xecho -b   - Sends an action with colored text to the channel using \$cparse()
		xecho -b   - /help 6 cparse for a list of color codes
	}
}

alias csay (text)
{
	if (text)
	{
		raw 402 $C $cparse("$text")
	}{
		xecho -b Usage: /csay <text>
		xecho -b   - Sends a public with colored text to the channel using \$cparse()
		xecho -b   - /help 6 cparse for a list of color codes
	}
}

alias cycle (chan default "$C", void)
{
	wait -cmd raw 400 $chan
	raw 401 $chan
}

alias links (void)
{
	admin links
}

alias lusers (void)
{
	admin stats
}

alias partall (void)
{
	input "Are you sure you want to part all your channels? (y/N) " if ([$0])
	{
		switch ($tolower($left(1 $0)))
		{
			(y)
			{
				fe ($onchannels()) chan
				{
					raw 401 $chan
				}
			}
			(*) {#}
		}
	}
}

alias pingme (void)
{
	ping $N
}

alias q query

alias quote raw

alias sv version

alias wi whois

/* Keep track of channels you have parted for 5 seconds after you
   part them. (Required for Auto-rejoin on channel clears) */
on -leave '$N *'
{
	local numitm
	@ numitm = numitems(part)
	@ setitem(part $numitems(part) $1)
	timer 5 @ cleanup_part($numitm)
}

/* Auto-rejoin on kick */
on -servermsg '% % $N out of channel *'
{
	local chan
	@ chan = before(-1 : $6)

	if (AUTO_REJOIN)
	{
		join $chan
	}
}

/* Auto-rejoin on channel clear */
on -servermsg "% cleared channel *"
{
	local chan
	@ chan = before(-1 : $3)

	if (AUTO_REJOIN && finditem(part $chan) > -1)
	{
		join $chan
	}
}

alias cleanup_part (item)
{
	@ delitem(part $item)
	return 1
}


/* bmw '01 */