First off let me just say that the alias is not mine it came from knoeki and his snippet http://www.hawkee.com/snippet/6763/
Ok this script is a pretty basic one all it does is:
saves meanings to a file
adds user to a list of who can add
deletes meanings from an ini file
tells you how many of whatever there is
tells you the meaning of the (number) item
Exsample
slub:saf slub slub wrote this
bot:added slb slub wrote this
slub:SRF slub
bot:Slub Slub wrote this
slub:Stf s
bot:Total number of meanings that start with s is 1
slub:Swf s 1
bot:The 1 for s is slub Slub wrote this
slub:Sdf slub
bot:deleted Slub from list
slub:Srf slub
bot:no records of Slub have been added
slub:sif
bot:Saf = Add an item and a meaning to the list
bot:Stf = Returns the total number of matches a itme, or you can use a wildcard such as o and it will look for all meanings that bgin with o
bot:Sdf = Deletes an item ftom meanings be sure to check if that item is in the first
bot: Swf = Returns the the words for a wildcard Exsample : SWF s 1 : This will send back to you the first word that has s at the start of it or you can try a word Exsample: Swf snow 1 : This will return anymeanings that start or have snow in it
bot:Srf = Returns the word and the meaning for an item
Stf and swf don't just have to be a single letter it can be pretty much anything.
CHANGE 7 TO YOUR USER LEVEL
For more help on user levels look at snippet: http://www.hawkee.com/snippet/7040/
NEW NEW NEW
Dialog HAS BEEN ADDED
Features:
Shows words added
Filtering system for words
Edit words, add words, delete words, shout words out, or send to a certain person
Add user, del user, inform user, see how many meanings a user has added
menu * {
Wikipedia:/dialog -ma saf saf
}
dialog saf {
title Wikipedia MIRC
size -1 -1 208 118
option dbu
list 1,3 20 100 100
edit , 2, 105 3 100 30, read, center, multi, vsbar
edit , 3, 25 3 50 10, center
text Filter, 4, 3 3 20 10
Button >, 5, 75 3 10 10
;Section one
button Delete, 6, 105 50 50 10
button Edit, 7, 155 50 50 10
button Shout out, 8, 105 60 50 10
button Send, 9, 155 60 50 10
list 10, 105 70 100 40
button SEND, 11, 125 100 50 10
button Add, 12, 105 40 50 10
button Next, 13, 155 40 50 10
button <, 14, 85 3 10 10
;Section two
button Add user, 15, 105 50 50 10
button Remove user, 16, 155 50 50 10
button Inform user, 17, 105 60 50 10
button Add's by user, 18, 155 60 50 10
list 19, 105 70 100 40
button back, 20, 155 40 50 10
}
on *:DIALOG:saf:init:*:{
var %a $ini(saf.ini , meanings,0) | var %b 1 | var %c 1
:loop
if %a == %c { goto next }
else {
did -o $dname 1 %c $ini(saf.ini , meanings,%b))
inc %b | inc %c | goto loop
}
:next
did -b $dname 6-9
set %channel $active
did -h $dname 10,11
did -h $dname 15-20
}
on *:DIALOG:saf:sclick:1:{
did -r $dname 2
did -o $dname 2 1 $readini(saf.ini, meanings, $did(1).seltext)
did -e $dname 6-9
did -h $dname 10,11
}
on *:DIALOG:saf:sclick:5:{
if !$did(3).text { did -o $dname 2 1 Enter a filter }
else {
$winif
}
}
on *:Dialog:saf:Sclick:6:{
remini saf.ini meanings $did(1).seltext
$input(Done,Ok,Remval of meaning,Removed,Removed meaning)
$restart
}
on *:DIALOG:SAF:SCLICK:7:{
writeini saf.ini meanings $did(1).seltext $input(Change $did(saf,1).seltext too,e,Change of Meaning)
}
on *:DIALOG:SAF:SCLICK:8:msg %channel $did(1).seltext Meaning is: $readini(saf.ini, meanings, $did(1).seltext)
on *:DIALOG:SAF:SCLICK:9:{
did -v $dname 10,11
$chanu
}
on *:DIALOG:SAF:SCLICK:11:{
if !$did(10).seltext { did -o $dname 2 1 Please select someone to send too }
else {
notice $did(10).seltext $did(1).seltext Meaning is: $readini(saf.ini, meanings, $did(1).seltext)
did -o $dname 2 1 Message sent
}
}
on *:DIALOG:SAF:SCLICK:12:{
writeini saf.ini meanings $input(Create a new meaning Please enter the word to add,e,New Meaning) $input(Meaning for this word,e,Adding of Meaning)
$restart
}
on *:DIALOG:SAF:SCLICK:13:{
did -h $dname 6-13
did -v $dname 15-20
did -b $dname 15-18
$chanup
}
on *:DIALOG:SAF:SCLICK:14:$restart
;add
on *:DIALOG:SAF:SCLICK:15:{
writeini SAF.ini Users $address($did(19).seltext,3) on
did -o $dname 2 1 Added $did(19).seltext to Saf list of users
notice $did(19).seltext You have been added
}
;del
on *:DIALOG:SAF:SCLICK:16:{
remini saf.ini users $address($did(19).seltext,3)
notice $did(19).seltext You have been deleted
}
;inform
on *:DIALOG:SAF:SCLICK:17:{
notice $did(19).seltext You Are a user of the Meanings adding list
did -r $dname 2
did -i $dname 2 1 Message sent
}
;see
on *:DIALOG:SAF:SCLICK:18:{
did -r $dname 2
did -i $dname 2 1 Meanings Added
did -i $dname 2 2 $iif(!$readini(saf.ini, times, $address($did(19).seltext,2)),0,$readini(saf.ini, times, $address($did(19).seltext,2))) }
;list
on *:DIALOG:SAF:SCLICK:19:{
if $readini(saf.ini, users, $address($did(19).seltext,3)) { did -b $dname 15 | did -e $dname 16-18 }
else {
did -e $dname 15
did -b $dname 16-18
}
}
on *:DIALOG:SAF:SCLICK:20:{
did -v $dname 6-9,13
did -h $dname 15-20
}
;;;;;;;;;;;@@@@@@@@@@@@::::::::::::::::
on 7:TEXT:Sadda *&:#:{
writeini SAF.ini Users $address($2,3) on
notice $nick Added $2 to Saf list of users
}
on *:TEXT:Saf *&:#:{
if $readini(SAF.ini, Users, $address($nick,3)) {
writeini SAF.ini Meanings $2-
notice $nick 4,2Added $2 = $3-
if !$readini(saf.ini, times, $address($nick,2)) { writeini saf.ini times $address($nick,2) 1 }
else {
var %x $readini(saf.ini, times, $address($nick,2))
inc %x
writeini saf.ini times $address($nick,2) %x
}
}
else { notice $nick Permission Denied }
}
on *:TEXT:Sdf *&:#:{
if $readini(SAF.ini, Users, $address($nick,3)) {
remini SAF.ini Meanings $2-
notice $nick 4,2Removed $2
}
else { notice $nick Permission Denied }
}
on *:TEXT:SUF *:#:{
if $2 ison $chan {
if !$readini(saf.ini, times, $address($2,2)) { notice $nick $2 has not added anything }
else { notice $nick $2 : $readini(saf.ini, times, $address($2,2)) }
}
else { notice $nick Error 1243 $2 is not in the channel }
}
on *:TEXT:Saf:*:{
if $readini(SAF.ini, Users, $address($nick,3)) {
notice $nick 4,2Commands Saf = Add an item Sdf = Delete an item Srf = show item
}
else { notice $nick Permission Denied }
}
on *:TEXT:Stf *:#:{
if !$wini(SAF.ini,Meanings, $+($2,*)) { notice $nick No record of $2 have been saved }
else { notice $nick Total Amount of meanings that match $2 is $wini(SAF.ini,Meanings, $+($2,*)) }
}
on *:TEXT:swf *:#:{
if !$3 { notice $nick Please enter a number }
else {
if !$wini(SAF.ini,Meanings,$+($2,*),$3) { notice $nick $2 do does not have that many matches, it only has $wini(SAF.ini,Meanings, $+($2,*)) }
else {
notice $nick The $3 for $2 is $wini(SAF.ini,Meanings, $+($2,*), $+($3)) }
}
}
on *:TEXT:Sif:#:{
notice $nick Welcome to the S*F Help:
notice $nick Saf = Add an item and a meaning to the list
notice $nick Stf = Returns the total number of matches a itme, or you can use a wildcard such as o and it will look for all meanings that bgin with o
notice $nick Sdf = Deletes an item ftom meanings be sure to check if that item is in the first
notice $nick Swf = Returns the the words for a wildcard Example : SWF s 1 : This will send back to you the first word that has s at the start of it or you can try a word Example: Swf snow 1 : This will return any meanings that start or have snow in it
notice $nick Srf = Returns the word and the meaning for an item
notice $nick SUF = Returns the total number of meanings someone has added
}
on *:TEXT:SRF *&:#:{
if $readini(SAF.ini, Meanings, $2) {
if $readini(SAF.ini, Users, $address($nick,3)) {
msg $chan $2 : $readini(SAF.ini, Meanings, $2) }
else { notice $nick $2 $readini(SAF.ini, Meanings, $2) }
}
else { notice $nick ERROR: $2 has not been set a meaning }
}
on 2:TEXT:Sof*:#:/notice $nick Total words added are $calc($lines(Saf.ini) - $lines(Saf.ini)
on 7:TEXT:Sremovea *&:#:{
remini SAF.ini Users $address($2,3)
notice $nick removed $2 from Saf list of users
}
alias -l winif {
if !$wini(SAF.ini,Meanings,$+($did(3),*),1) { did -o $dname 2 1 No words saved with that }
else {
var %a 1 | var %b 1
did -r $dname 1
:looi
if !$wini(SAF.ini,Meanings,$+($did(3),*),%a) { noop }
else { did -o $dname 1 %b $wini(SAF.ini,Meanings,$+($did(3),*),%a) | inc %a | inc %b | goto looi }
}
}
alias -l restart {
dialog -x saf saf
dialog -ma saf saf
}
alias -l safea {
if $active == Status Window { dialog -x saf saf | noop $tip(n,ERROR,Must be in a channel,2,,,,,)) | halt }
}
alias -l chanu {
$safea
set %channel $active
var %peep $calc($nick(%channel,0) +1)
var %b 1
:lol
if %b == %peep { noop }
else { did -i $dname 10 %b $nick(%channel,%b) | inc %a | inc %b | goto lol } }
alias -l chanup {
$safea
set %channel $active
var %peep $calc($nick(%channel,0) +1)
var %b 1
:lol
if %b == %peep { noop }
else { did -i $dname 19 %b $nick(%channel,%b) | inc %a | inc %b | goto lol } }
@DeeperStill Op only would be
;;;The alias do not delete you can move this to the alias tab just remove alias from the top
alias wini {
var %file $1
var %cat $2
if ($3 != $null) {
if ($3 !isnum) {
var %item $3
if ($4 != $null) {
var %return $4
}
}
else {
var %return $3
}
}
var %count 1
var %total $iif(%item == $null, $ini(%file, 0), $ini(%file, %cat, 0))
while (%count <= %total) {
var %current $iif(%item == $null, $ini(%file, %count), $ini(%file, %cat, %count))
if ($iif(%item == $null, %cat, %item) iswm %current) {
var %result $addtok(%result, %current, 32)
}
inc %count
}
if (%return != $null) {
return $gettok(%result, %return, 32)
}
else {
return $numtok(%result, 32)
}
}
;;;The script remember to add someone before hand
on *:TEXT:Saf*&:#:{
if $nick isop $chan {
writeini SAF.ini Meanings $2-
notice $nick 4,2Added $2 = $3-
}
else { notice $nick Permission Denied }
}
on *:TEXT:Sdf*&:#:{
if $nick isop $chan {
remini SAF.ini Meanings $2-
notice $nick 4,2Removed $2
}
else { notice $nick Permission Denied }
}
on *:TEXT:Saf:#:{
if $nick isop $chan {
notice $nick 4,2Commands Saf = Add an item Sdf = Delete an item Srf = show item
}
else { notice $nick Permission Denied }
}
on *:TEXT:Stf*:#:{
if !$wini(SAF.ini,Meanings, $+($2,*)) { notice $nick No record of $2 have been saved }
else { notice $nick Total Amount of meanings that match $2 is $wini(SAF.ini,Meanings, $+($2,*)) }
}
on *:TEXT:swf*:#:{
if !$3 { notice $nick Please enter a number }
else {
if !$wini(SAF.ini,Meanings, $+($2,*), $+($3)) { notice $nick $2 do does not have that many matches, it only has $wini(SAF.ini,Meanings, $+($2,*)) }
else {
var %inimach = $wini(SAF.ini,Meanings, $+($2,*), $+($3))
notice $nick The $3 for $2 is $wini(SAF.ini,Meanings, $+($2,*), $+($3)) $readini(SAF.ini, Meanings, %inimach) }
}
}
on *:TEXT:Sif:#:{
notice $nick Welcome to the S*F Help:
notice $nick Saf = Add an item and a meaning to the list
notice $nick Stf = Returns the total number of matches a itme, or you can use a wildcard such as o and it will look for all meanings that bgin with o
notice $nick Sdf = Deletes an item ftom meanings be sure to check if that item is in the first
notice $nick Swf = Returns the the words for a wildcard Exsample : SWF s 1 : This will send back to you the first word that has s at the start of it or you can try a word Exsample: Swf snow 1 : This will return anymeanings that start or have snow in it
notice $nick Srf = Returns the word and the meaning for an item
}
on 2:TEXT:SRF*&:#:{
if (!%srf) {
if $readini(saf.ini, Meanings, $2) {
notice $nick $2 : $readini(saf.ini, Meanings, $2)
}
else { notice $nick No-records of $2 have been saved }
}
else {
if $readini(saf.ini, Meanings, $2) {
msg $chan $2 : $readini(saf.ini, Meanings, $2)
}
else { notice $nick No-records of $2 have been saved }
}
}
on 7:TEXT:Sremovea*&:#:{
remini SAF.ini Users $address($2,3)
notice $nick removed $2 from Saf list of users
}
;;;;;;;;;;;;;;;;;;Change 7 to your user level ;;;;;;;;;;;;;;;;;;;;;;;;
And yes it is like making your own wiki :)
I am a noob and i am not sure I understand the function of this code. Are you saying that a person in a channel can add a word, a defintion to the word,and Author of said definition, and basically, make a Mirc Wiki. Id call it a Miki and its a great idea. people in their own channels can have their own Miki
hahaha
sounds cool to me
Kind regards
DS
Ps, Id make it so only ops can add words.